Exemplo n.º 1
0
 /**
  * Prevent a user from seeing the login form if they are already logged in.
  * 
  * @access protected
  * @return void
  */
 protected function noLoginForLoggedIn()
 {
     if ($this->session->loggedIn()) {
         // If they are logged in and on the login page, send them to the homepage
         if ('login' == strtolower($this->getRequest()->getControllerName())) {
             $this->_redirect('/');
         }
     }
 }