コード例 #1
0
ファイル: AuthController.php プロジェクト: optik/User
 public function postResetComplete($userId, $code, ResetCompleteRequest $request)
 {
     try {
         $this->dispatchFromArray('Modules\\User\\Commands\\CompleteResetProcessCommand', array_merge($request->all(), ['userId' => $userId, 'code' => $code]));
     } catch (UserNotFoundException $e) {
         flash()->error(trans('user::messages.user no longer exists'));
         return redirect()->back()->withInput();
     } catch (InvalidOrExpiredResetCode $e) {
         flash()->error(trans('user::messages.invalid reset code'));
         return redirect()->back()->withInput();
     }
     flash()->success(trans('user::messages.password reset'));
     return redirect()->route('login');
 }
コード例 #2
0
ファイル: AuthController.php プロジェクト: mikemand/User
 public function postResetComplete($userId, $code, ResetCompleteRequest $request)
 {
     try {
         app(UserResetter::class)->finishReset(array_merge($request->all(), ['userId' => $userId, 'code' => $code]));
     } catch (UserNotFoundException $e) {
         flash()->error(trans('user::messages.user no longer exists'));
         return redirect()->back()->withInput();
     } catch (InvalidOrExpiredResetCode $e) {
         flash()->error(trans('user::messages.invalid reset code'));
         return redirect()->back()->withInput();
     }
     flash()->success(trans('user::messages.password reset'));
     return redirect()->route('login');
 }