public function loadUser($authUser) { if (AuthUserData::userExistConfirmed($authUser)) { $this->userID = AuthUserData::getUserIDByUserName($authUser); return true; } return false; }
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!')); } } }
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!')); } } }
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; }
public function setQuestion($question, $answer) { AuthUserData::updateSecurityQuestion($this->userData['userID'], $question, $answer); return true; }
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')); } } } }