diff options
Diffstat (limited to 'app/Controller/Auth.php')
-rw-r--r-- | app/Controller/Auth.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Controller/Auth.php b/app/Controller/Auth.php index 5284e126..b882a720 100644 --- a/app/Controller/Auth.php +++ b/app/Controller/Auth.php @@ -14,6 +14,8 @@ class Auth extends Base * Display the form login * * @access public + * @param array $values + * @param array $errors */ public function login(array $values = array(), array $errors = array()) { @@ -21,7 +23,7 @@ class Auth extends Base $this->response->redirect($this->helper->url->to('app', 'index')); } - $this->response->html($this->template->layout('auth/index', array( + $this->response->html($this->helper->layout->app('auth/index', array( 'captcha' => ! empty($values['username']) && $this->userLocking->hasCaptcha($values['username']), 'errors' => $errors, 'values' => $values, @@ -55,8 +57,12 @@ class Auth extends Base */ public function logout() { - $this->sessionManager->close(); - $this->response->redirect($this->helper->url->to('auth', 'login')); + if (! DISABLE_LOGOUT) { + $this->sessionManager->close(); + $this->response->redirect($this->helper->url->to('auth', 'login')); + } else { + $this->response->redirect($this->helper->url->to('auth', 'index')); + } } /** |