Пример #1
0
 public function loadUser($authUser)
 {
     if (AuthUserData::userExistConfirmed($authUser)) {
         $this->userID = AuthUserData::getUserIDByUserName($authUser);
         return true;
     }
     return false;
 }
Пример #2
0
 function get_xhr($email)
 {
     if ($this->checkAuth()) {
         if (!AuthUserData::emailExist(mb_strtolower($email))) {
             echo json_encode(StatusReturn::S200());
         } else {
             echo json_encode(StatusReturn::E400('Email Already Being Used!'));
         }
     }
 }
Пример #3
0
 function get_xhr($authUser)
 {
     if ($this->checkAuth()) {
         if (!AuthUserData::userExist(mb_strtolower($authUser))) {
             echo json_encode(StatusReturn::S200());
         } else {
             echo json_encode(StatusReturn::E400('Username Exists Already!'));
         }
     }
 }
Пример #4
0
 public function delUser()
 {
     if ($this->validated) {
         AuthUserData::delAuthUser($this->userID);
         AuthUserRolesData::delAuthUserRoles($this->userID);
         AuthUserSessionsData::delAuthUserSessions($this->userID);
         AuthUserSuccessfulIPsData::delAuthUserSuccessfulIPs($this->userID);
         return true;
     }
     return false;
 }
Пример #5
0
 public function setQuestion($question, $answer)
 {
     AuthUserData::updateSecurityQuestion($this->userData['userID'], $question, $answer);
     return true;
 }
Пример #6
0
 function delete_xhr($userID)
 {
     if ($this->checkAuth()) {
         if (AuthUserData::userExistByID($userID)) {
             $headers = getallheaders();
             $subUser = new AuthSubUser(mb_strtolower($headers['Auth-User']), (int) $userID);
             if ($subUser->delUser()) {
                 echo json_encode(StatusReturn::S200());
             } else {
                 echo json_encode(StatusReturn::E400('Error'));
             }
         }
     }
 }