Rename controllers
This commit is contained in:
@@ -39,7 +39,7 @@ class AuthenticationMiddleware extends BaseMiddleware
|
||||
$this->response->text('Not Authorized', 401);
|
||||
} else {
|
||||
$this->sessionStorage->redirectAfterLogin = $this->request->getUri();
|
||||
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
||||
$this->response->redirect($this->helper->url->to('AuthController', 'login'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class PostAuthenticationMiddleware extends BaseMiddleware
|
||||
{
|
||||
$controller = strtolower($this->router->getController());
|
||||
$action = strtolower($this->router->getAction());
|
||||
$ignore = ($controller === 'twofactorcontroller' && in_array($action, array('code', 'check'))) || ($controller === 'auth' && $action === 'logout');
|
||||
$ignore = ($controller === 'twofactorcontroller' && in_array($action, array('code', 'check'))) || ($controller === 'authcontroller' && $action === 'logout');
|
||||
|
||||
if ($ignore === false && $this->userSession->hasPostAuthentication() && ! $this->userSession->isPostAuthenticationValidated()) {
|
||||
$this->nextMiddleware = null;
|
||||
|
||||
Reference in New Issue
Block a user