X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/1ee3e779e4b9b0a92f701a72f21a72c83cb1ce68..refs/pull/1695/head:/app/Http/Controllers/Auth/UserInviteController.php diff --git a/app/Http/Controllers/Auth/UserInviteController.php b/app/Http/Controllers/Auth/UserInviteController.php index cfeb69648..313faf5bc 100644 --- a/app/Http/Controllers/Auth/UserInviteController.php +++ b/app/Http/Controllers/Auth/UserInviteController.php @@ -54,12 +54,12 @@ class UserInviteController extends Controller /** * Sets the password for an invited user and then grants them access. - * @param string $token * @param Request $request + * @param string $token * @return RedirectResponse|Redirector * @throws Exception */ - public function setPassword(string $token, Request $request) + public function setPassword(Request $request, string $token) { $this->validate($request, [ 'password' => 'required|min:8' @@ -77,7 +77,7 @@ class UserInviteController extends Controller $user->save(); auth()->login($user); - session()->flash('success', trans('auth.user_invite_success', ['appName' => setting('app-name')])); + $this->showSuccessNotification( trans('auth.user_invite_success', ['appName' => setting('app-name')])); $this->inviteService->deleteByUser($user); return redirect('/'); @@ -96,11 +96,10 @@ class UserInviteController extends Controller } if ($exception instanceof UserTokenExpiredException) { - session()->flash('error', trans('errors.invite_token_expired')); + $this->showErrorNotification( trans('errors.invite_token_expired')); return redirect('/password/email'); } throw $exception; } - }