CC-2697: airtime-user script is not working

-added support for new user types
This commit is contained in:
martin 2011-08-19 16:40:53 -04:00
parent ea2981574c
commit e53c6d8061

View file

@ -99,10 +99,12 @@ if ($action == "addupdate") {
$user->setLastName($line);
do{
echo "Enter user type [(A)dmin|(H)ost|(G)uest]: ";
echo "Enter user type [(A)dmin|(P)rogram Manager|(D)J|(G)uest]: ";
$line = trim(fgets(fopen("php://stdin","r")));
} while($line != "A" && $line != "H" && $line != "G");
$user->setType($line);
} while($line != "A" && $line != "P" && $line != "D" && $line != "G");
$types = array("A"=>"A", "P"=>"P", "D"=>"H", "G"=>"G",);
$user->setType($types[$line]);
$user->save();
} elseif ($action == "delete") {