]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Middleware/Authenticate.php
Quick test of email confirmation routes and fix of tests
[bookstack] / app / Http / Middleware / Authenticate.php
index b9b5545f2a541a302e6a60b81985009f4dc62723..dede8f26056528445d01792d119243025c0ebf0b 100644 (file)
@@ -21,26 +21,4 @@ class Authenticate
 
         return $next($request);
     }
-
-    /**
-     * Provide an error response for when the current user's email is not confirmed
-     * in a system which requires it.
-     */
-    protected function emailConfirmationErrorResponse(Request $request)
-    {
-        if ($request->wantsJson()) {
-            return response()->json([
-                'error' => [
-                    'code'    => 401,
-                    'message' => trans('errors.email_confirmation_awaiting'),
-                ],
-            ], 401);
-        }
-
-        if (session()->get('sent-email-confirmation') === true) {
-            return redirect('/register/confirm');
-        }
-
-        return redirect('/register/confirm/awaiting');
-    }
 }