X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FLoginController.php;h=495c27c408b38939ddc861047cd75be9ca0c5d3f;hb=a64d41557a62ec6051d7fa08d1ba941e089aa5c2;hp=48636214855fbcd672d941ab275c2201ed325565;hpb=1de0f433144272946051bb0df886b8c43459beb8;p=syj.git diff --git a/application/controllers/LoginController.php b/application/controllers/LoginController.php index 4863621..495c27c 100644 --- a/application/controllers/LoginController.php +++ b/application/controllers/LoginController.php @@ -51,9 +51,7 @@ class LoginController extends Zend_Controller_Action } $userid = $authAdapter->getResultRowObject('id')->id; - $auth->getStorage()->write(array('user' => $userid)); - Zend_Session::rememberMe(); // zend default expiration delay is 2 weeks. Ok, use that value - + $this->_helper->SyjSession->login($userid); if ($httprequest) { $api = $this->_helper->SyjApi->setCode(200); @@ -65,13 +63,13 @@ class LoginController extends Zend_Controller_Action if (!$pathMapper->find((int)$login_geom_id, $path)) { throw new Syj_Exception_Request(); } - if ($path->owner->id === $userid) { - $api->setBody("1"); // owner of displayed geometry + if ($path->creator->id === $userid) { + $api->setBody("1"); // creator of displayed geometry } else { $api->setBody("0"); } } else { - $api->setBody("1"); // no geometry displayed: owner of the (future) geometry + $api->setBody("1"); // no geometry displayed: creator of the (future) geometry } } else { $this->redirect(); @@ -79,8 +77,7 @@ class LoginController extends Zend_Controller_Action } public function logoutAction() { - Zend_Session::start(); - Zend_Session::destroy(); + $this->_helper->SyjSession->logout(); $this->redirect(); }