/** * POST: /manage/change-password */ public function changePasswordPost() { $model = new ManageChangePasswordModel(Language::$CHANGE_YOUR_PASSWORD[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->changePassword($model->authenticatedUserEntity->id, $model->password); parent::redirectToUrlFromAction('manage', 'index'); } $model->passwordValidation = Language::$INVALID_PASSWORD[Config::$LANGUAGE] . " {$errorMessage}"; $model->validation = false; } parent::view(new ChangePassword(), $model); }