/** * POST: /manage/delete */ public function deletePost() { $model = new ManageDeleteModel(Language::$DELETE_ACCOUNT[Config::$LANGUAGE], true); if ($model->validation) { $userDAO = new UserDAO(); $errorMessage = $userDAO->passwordVerify($model->authenticatedUserEntity->id, $model->password, $model->authenticatedUserEntity->passwordHash, $model->authenticatedUserEntity->lockoutEnabled, $model->authenticatedUserEntity->lockoutEndDate, $model->authenticatedUserEntity->accessFailedCount); if ($errorMessage == '') { $userDAO->delete($model->authenticatedUserEntity->id); Authentication::signOut(); parent::redirectToUrlFromAction('main', 'index'); } $model->passwordValidation = Language::$INVALID_PASSWORD[Config::$LANGUAGE] . " {$errorMessage}"; $model->validation = false; } parent::view(new Delete(), $model); }
/** * POST: /account/logoff */ public function logoffPost() { Authentication::signOut(); $args = explode('/', $_REQUEST['Url']); unset($args[0]); parent::redirectToUrlFromArray($args); }