X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cac31b2074cc0429423ffe7b8646ca0b5b367fe6..refs/pull/4467/head:/app/Exceptions/StoppedAuthenticationException.php diff --git a/app/Exceptions/StoppedAuthenticationException.php b/app/Exceptions/StoppedAuthenticationException.php index 7a978ffc6..51e48aa1c 100644 --- a/app/Exceptions/StoppedAuthenticationException.php +++ b/app/Exceptions/StoppedAuthenticationException.php @@ -2,14 +2,13 @@ namespace BookStack\Exceptions; -use BookStack\Auth\Access\LoginService; -use BookStack\Auth\User; +use BookStack\Access\LoginService; +use BookStack\Users\Models\User; use Illuminate\Contracts\Support\Responsable; 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 +}