From 0c9d8083029cf44195b683bca5faa0d6f757f7f7 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Mon, 22 Jan 2018 14:12:23 -0500 Subject: [PATCH] Handle special email cases - e.g. multiple email addresses --- getmappings.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/getmappings.php b/getmappings.php index 7360505..3e2bfd2 100755 --- a/getmappings.php +++ b/getmappings.php @@ -32,6 +32,13 @@ function writeUsers($projectsById, $membershipMapping) { foreach ($membershipMapping as $email => $projectId) { fwrite ($userHandle, "$email,{$projectsById[$projectId]}\n"); } + // Handle special user cases. + $specialUsers = fopen(__DIR__ . '/data/specialusers.csv', 'r'); + while (!feof($specialUsers)) { + $specialUser = fread($specialUsers, 1000); + fwrite ($userHandle, $specialUser); + } + fclose($specialUsers); fclose($userHandle); }