CakePHP : when I change controller Session is death -


var $name = 'users'; var $components = array('auth', 'acl');   function beforefilter(){     //parent::beforefilter();     $this->auth->usermodel = 'user';      $this->auth->allow('register','login','step2','takeid'); } function login(){     if(!empty($this->data)){         if($this->auth->login()){             $this->session->setflash(__('zalogowany!'));             $this->redirect('/');         } else {             $this->user->invalidate('password', 'haslo lub login niepoprawny.!');         }     }  } function logout(){     $this->auth->logout();     $this->redirect('/'); } 

and f.e. when create:

class userregisterscontroller extends appcontroller {      var $name = 'userregisters';     var $components = array('auth', 'acl');       public function beforefilter()     {         $this->auth->usermodel = 'user';         $this->auth->allow('index','view','register','edit');      } } 

now, main problem:

i want read $this->session->read('auth'); , when put line link : website/noexistcontroller/page --> fine when website/userregisters/page --> session death, return false :)

where mistake? idea?

thx :)


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -