Пример #1
0
 /**
  * Handles actions that are public to the user.
  *
  * If the user is already logged in, replace the parent method's
  * redirection with a version that works for this controller. Then perform
  * the parent method.
  */
 protected function _handlePublicActions()
 {
     // Get the action being performed.
     $action = $this->_request->getActionName();
     // Do nothing if it is not a public action.
     if (!in_array($action, $this->_publicActions)) {
         return;
     }
     // If the user is logged in, redirect to the actual home page.
     if ($this->getInvokeArg('bootstrap')->getResource('Currentuser')) {
         $this->_helper->redirector->gotoUrl('');
     }
     // Call the parent method.
     parent::_handlePublicActions();
 }