]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/StoppedAuthenticationException.php
Queries: Update API to align data with previous versions
[bookstack] / app / Exceptions / StoppedAuthenticationException.php
index ef7f24017904f1f85f39f5de26fa528ef479184e..51e48aa1cf307f7dc211fd2e96f94eadc3dbf583 100644 (file)
@@ -2,8 +2,8 @@
 
 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;
 
@@ -23,7 +23,7 @@ class StoppedAuthenticationException extends \Exception implements Responsable
     }
 
     /**
-     * @inheritdoc
+     * {@inheritdoc}
      */
     public function toResponse($request)
     {
@@ -55,7 +55,7 @@ class StoppedAuthenticationException extends \Exception implements Responsable
             ], 401);
         }
 
-        if (session()->get('sent-email-confirmation') === true) {
+        if (session()->pull('sent-email-confirmation') === true) {
             return redirect('/register/confirm');
         }