]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/LoginController.php
cache js, css and png files
[syj.git] / application / controllers / LoginController.php
index 85c7ac1541a972c3966d5a6798146167531a2704..152d18828a13adb44c88f5c71fe3ba58eb986b3c 100644 (file)
@@ -7,9 +7,7 @@ class LoginController extends Zend_Controller_Action
     public function init() {
         $this->view->headTitle($this->view->translate("login"));
         $this->_helper->SyjMedias->addScripts('login');
-        $this->view->headLink()->appendStylesheet('css/generic.css', 'all');
-        $this->view->headLink()->appendStylesheet('css/form.css', 'all');
-        $this->view->headLink()->appendStylesheet('css/login.css', 'all');
+        $this->_helper->SyjMedias->addStyleSheets('login');
     }
 
     public function loginAction() {
@@ -32,7 +30,9 @@ class LoginController extends Zend_Controller_Action
         }
 
         /* form has been filled */
-        if (!$this->_helper->SyjUserManager->validate($formData['login_user'], sha1($formData['login_password']))) {
+        if (!$this->_helper->SyjUserManager->validate($formData['login_user'],
+                                                     sha1($formData['login_password']),
+                                                     $formData['login_rememberme'])) {
             if ($httprequest) {
                 throw new Syj_Exception_Forbidden();
             } else {
@@ -54,7 +54,7 @@ class LoginController extends Zend_Controller_Action
                 if (!$pathMapper->find((int)$login_geom_id, $path)) {
                     throw new Syj_Exception_Request();
                 }
-                $data['iscreator'] = ($path->creator->id === $userid);
+                $data['iscreator'] = ($path->creator->id === $user->id);
             } else {
                 $data['iscreator'] = true;
             }