Use __DIR__ magic constant instead of environment variable
This commit is contained in:
@ -20,7 +20,7 @@ $membershipMapping = getUserMemberships($userList, $client);
|
||||
writeUsers($projectsById, $membershipMapping);
|
||||
|
||||
function writeDomains($projectsByDomain) {
|
||||
$domainHandle = fopen('./data/domainmap.csv', 'w');
|
||||
$domainHandle = fopen(__DIR__ . '/data/domainmap.csv', 'w');
|
||||
foreach ($projectsByDomain as $domain => $identifier) {
|
||||
fwrite ($domainHandle, "$domain,$identifier\n");
|
||||
}
|
||||
@ -28,7 +28,7 @@ function writeDomains($projectsByDomain) {
|
||||
}
|
||||
|
||||
function writeUsers($projectsById, $membershipMapping) {
|
||||
$userHandle = fopen('./data/usermap.csv', 'w');
|
||||
$userHandle = fopen(__DIR__ . '/data/usermap.csv', 'w');
|
||||
foreach ($membershipMapping as $email => $projectId) {
|
||||
fwrite ($userHandle, "$email,{$projectsById[$projectId]}\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user