Example #1
0
 /**
  * Store User Email if not given by OAuth.
  *
  * @param StoreEmailRequest $request
  *
  * @return Illuminate\Http\RedurectResponse
  */
 public function storeEmail(StoreEmailRequest $request)
 {
     $user = auth()->user();
     $user->email = $request->get('email');
     $user->save();
     $requestedPath = Session::get('requestedPath', '/settings');
     return redirect($requestedPath)->withMessage("Your email has been updated.");
 }
Example #2
0
 /**
  * Store User Email if not given by OAuth.
  *
  * @param StoreEmailRequest $request
  *
  * @return Illuminate\Http\RedurectResponse
  */
 public function storeEmail(StoreEmailRequest $request)
 {
     $user = Auth::user();
     $user->email = $request->get('email');
     $user->save();
     $requestedPath = Session::get('requestedPath', '/settings');
     Session::flash('message', 'Youre email has been updated.');
     Session::flash('message_type', 'success');
     return redirect($requestedPath);
 }