diff options
Diffstat (limited to 'application/controllers/PersonController.php')
| -rw-r--r-- | application/controllers/PersonController.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/application/controllers/PersonController.php b/application/controllers/PersonController.php index 05177c3..65a4cca 100644 --- a/application/controllers/PersonController.php +++ b/application/controllers/PersonController.php @@ -3,23 +3,19 @@ class PersonController extends Zend_Controller_Action { - public function init() + public function preDispatch() { + if (!Zend_Auth::getInstance()->hasIdentity()) { + // TODO: quick hack fixxen + $this->_redirect('/Auth/login'); + } } public function indexAction() { - if (!Zend_Auth::getInstance()->hasIdentity()) { - - echo 'case1'; - - - echo "already logged in as: " . Zend_Auth::getInstance()->getIdentity(); - #$this->_redirect($this->url(array('Auth','login'))); - } - echo 'case2'; - // action body + echo 'case2'; + // action body } public function registerAction() |
