コード例 #1
0
 /**
  * Password Change Action
  * Submit form, if retured positive redirect to index, otherwise show the changePassword page again
  */
 public function changePassword_action()
 {
     $result = PasswordResetModel::changePassword(Session::get('user_name'), Request::post('user_password_current'), Request::post('user_password_new'), Request::post('user_password_repeat'));
     if ($result) {
         Redirect::to('user/index');
     } else {
         Redirect::to('user/changePassword');
     }
 }
コード例 #2
0
 /**
  * Set the new password
  * Please note that this happens while the user is not logged in. The user identifies via the data provided by the
  * password reset link from the email, automatically filled into the <form> fields. See verifyPasswordReset()
  * for more. Then (regardless of result) route user to index page (user will get success/error via feedback message)
  * POST request !
  * TODO this is an _action
  */
 public function setNewPassword()
 {
     PasswordResetModel::setNewPassword(Request::post('user_name'), Request::post('user_password_reset_hash'), Request::post('user_password_new'), Request::post('user_password_repeat'));
     Redirect::to('login/index');
 }