From 8e1302857fb4350bb68a7b334a183ba68c59e91c Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 31 Jan 2011 15:09:44 +0100 Subject: Login funktioniert --- application/controllers/PersonController.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'application/controllers/PersonController.php') diff --git a/application/controllers/PersonController.php b/application/controllers/PersonController.php index 9a8aea2..a0b2faf 100644 --- a/application/controllers/PersonController.php +++ b/application/controllers/PersonController.php @@ -3,20 +3,17 @@ 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 } -- cgit v1.2.3-55-g7522