Advertisement
Guest User

Untitled

a guest
Oct 1st, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. public function storePassword( UserChangePasswordRequest $request )
  2.     {
  3.         $user = frontend_user();
  4.         if($user && $user->enabled) {
  5.             try {
  6.                 $this->interaction(UpdateFrontendUserPassword::class, [
  7.                     $this->guard()->getCognitoAccessToken(),
  8.                     $request
  9.                 ]);
  10.                 return AjaxResponse::success('success',[
  11.                     'message' => __('Your Account settings were updated successfully.')
  12.                 ]);
  13.             } catch (\Throwable $exception) {
  14.                 \Log::error( $exception );
  15.                 return AjaxResponse::error( 'error', [
  16.                     'message' => __('There is a problem. Please try again.')
  17.                 ] );
  18.             }
  19.         }
  20.         return AjaxResponse::error( 'error', [
  21.             'message' => __('There is a problem. Please try again.')
  22.         ] );
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement