]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Middleware/Authenticate.php
Finished migration of last angular code
[bookstack] / app / Http / Middleware / Authenticate.php
index 372f30bf64f545957cd3a8fb2a63e27416ec441f..b7801668882cd5726c2adad97312228d7c14913b 100644 (file)
@@ -4,8 +4,6 @@ namespace BookStack\Http\Middleware;
 
 use Closure;
 use Illuminate\Contracts\Auth\Guard;
-use BookStack\Exceptions\UserRegistrationException;
-use Setting;
 
 class Authenticate
 {
@@ -33,7 +31,7 @@ class Authenticate
     public function handle($request, Closure $next)
     {
         if ($this->auth->check() && setting('registration-confirmation') && !$this->auth->user()->email_confirmed) {
-            return redirect()->guest(baseUrl('/register/confirm/awaiting'));
+            return redirect(baseUrl('/register/confirm/awaiting'));
         }
 
         if ($this->auth->guest() && !setting('app-public')) {