Ejemplo n.º 1
0
 /**
  * Attempt change password of the user
  *
  */
 public function postReset()
 {
     $input = array('token' => Input::get('token'), 'password' => Input::get('password'), 'password_confirmation' => Input::get('password_confirmation'));
     // By passing an array with the token, password and confirmation
     if ($this->userRepo->resetPassword($input)) {
         $notice_msg = Lang::get('confide::confide.alerts.password_reset');
         return Redirect::to('user/login')->with('notice', $notice_msg);
     } else {
         $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');
         return Redirect::to('user/reset', array('token' => $input['token']))->withInput()->with('error', $error_msg);
     }
 }