CC-2697: airtime-user script is not working
-added support for new user types
This commit is contained in:
parent
ea2981574c
commit
e53c6d8061
1 changed files with 5 additions and 3 deletions
|
@ -99,10 +99,12 @@ if ($action == "addupdate") {
|
||||||
$user->setLastName($line);
|
$user->setLastName($line);
|
||||||
|
|
||||||
do{
|
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")));
|
$line = trim(fgets(fopen("php://stdin","r")));
|
||||||
} while($line != "A" && $line != "H" && $line != "G");
|
} while($line != "A" && $line != "P" && $line != "D" && $line != "G");
|
||||||
$user->setType($line);
|
|
||||||
|
$types = array("A"=>"A", "P"=>"P", "D"=>"H", "G"=>"G",);
|
||||||
|
$user->setType($types[$line]);
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
} elseif ($action == "delete") {
|
} elseif ($action == "delete") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue