Пример #1
0
 /**
  * Executes resetPassword method in SessionsRepository
  *
  * @param  array  $input
  * @return Response
  */
 public function requestResetPassword($input)
 {
     if ($this->SessionsRepository->resetPassword($input)) {
         return $this->Redirect->route('dvs-user-reset-password')->with('message-success', $this->SessionsRepository->message);
     }
     $urlWithToken = $this->URL->route('dvs-user-reset-password') . '?token=' . $input['token'];
     return $this->Redirect->to($urlWithToken)->withInput()->withErrors($this->SessionsRepository->errors)->with('message-errors', $this->SessionsRepository->message);
 }