X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2FPathController.php;h=37394d02dbfd4bc3331a3771543f09d772365187;hp=bd4d33908bdfeb409b0a9eff47e654ae10908d2d;hb=05ce9238adfa982746bfc6211b240fd24526af09;hpb=011d9f73366efb4ce530b8b6da72055025419527 diff --git a/application/controllers/PathController.php b/application/controllers/PathController.php index bd4d339..37394d0 100644 --- a/application/controllers/PathController.php +++ b/application/controllers/PathController.php @@ -7,17 +7,8 @@ class PathController extends Zend_Controller_Action public function indexAction() { $formData = $this->_helper->SyjPostData->getPostData('Syj_Form_Geom'); - $sessionStorage = Zend_Auth::getInstance()->getStorage(); - if ($sessionStorage->isEmpty()) { - throw new Syj_Exception_Forbidden(); - } - $sessionData = $sessionStorage->read(); - - $user = new Syj_Model_User(); - $userMapper = new Syj_Model_UserMapper(); - if (!$userMapper->find($sessionData['user'], $user)) { - // we could also throw a forbidden exception, but client session - // should not contain reference to a non existent user. So, it's considered a bug. + $user = $this->_helper->SyjSession->user(); + if (!$user) { throw new Syj_Exception_Forbidden(); }