X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cac31b2074cc0429423ffe7b8646ca0b5b367fe6..refs/pull/3012/head:/app/Exceptions/StoppedAuthenticationException.php diff --git a/app/Exceptions/StoppedAuthenticationException.php b/app/Exceptions/StoppedAuthenticationException.php index 7a978ffc6..b9aadb03f 100644 --- a/app/Exceptions/StoppedAuthenticationException.php +++ b/app/Exceptions/StoppedAuthenticationException.php @@ -9,7 +9,6 @@ use Illuminate\Http\Request; class StoppedAuthenticationException extends \Exception implements Responsable { - protected $user; protected $loginService; @@ -24,7 +23,7 @@ class StoppedAuthenticationException extends \Exception implements Responsable } /** - * @inheritdoc + * {@inheritdoc} */ public function toResponse($request) { @@ -50,16 +49,16 @@ class StoppedAuthenticationException extends \Exception implements Responsable if ($request->wantsJson()) { return response()->json([ 'error' => [ - 'code' => 401, + 'code' => 401, 'message' => trans('errors.email_confirmation_awaiting'), ], ], 401); } - if (session()->get('sent-email-confirmation') === true) { + if (session()->pull('sent-email-confirmation') === true) { return redirect('/register/confirm'); } return redirect('/register/confirm/awaiting'); } -} \ No newline at end of file +}