diff --git a/manager/user.php b/manager/user.php index 8eeb282..d4597a0 100755 --- a/manager/user.php +++ b/manager/user.php @@ -130,7 +130,7 @@ require_once __ROOT__.'/manager/database.php'; /* [a] userlist */ function user_getUserList(){ $userlistFile = file_get_contents("src/userlist.json"); - $answer->request = json_decode( $userlistFile ); + return json_decode( $userlistFile ); } @@ -185,16 +185,16 @@ require_once __ROOT__.'/manager/database.php'; $_SESSION['semestre'] = ''.$semestre.''; } - $answer->request = 'success'; + return 'success'; }else - $answer->request = 'not_in_db'; + return 'not_in_db'; }else - $answer->request = 'wrong_password'; + return 'wrong_password'; }else - $answer->request = 'unknown_user'; + return 'unknown_user'; } @@ -212,7 +212,7 @@ require_once __ROOT__.'/manager/database.php'; if( $timestamp == null ) $timestamp = time(); - $answer->request = Date('m', $timestamp) < 8; + return Date('m', $timestamp) < 8; } ?> \ No newline at end of file