m really sorry for the delay but I really misunderstood the question I don't know if you mean this
http://book.cakephp.org/view/431/disableCache On Nov 4, 3:40 pm, "Prof. No Time" <[email protected]> wrote: > Thanks very very much RobustSolution, I have applied your logic. Its > ok though I didn't use the "famous" remember me here checkbox. I have > studied the issue and finally discovered that it is a fault of the > BUGGY INTERNET EXPLORER that keeps CACHING the page instead of > visiting the SERVER for proper details (Stupid Explorer!!!). Please > can you help me out on how to prevent caching of the LOGOUT page by > such browsers? > > Cheers in ADV. > > On Nov 2, 3:29 pm, robustsolution <[email protected]> wrote: > > > Prof.NoTime > > > try to take a coffee cup and get relaxed, this is my current solution/ > > tips/tricks for the moment > > > 1)put this in your AppController class > > final protected function _logout() { > > if (!empty($this->Cookie)) { > > //this ensures if you were using the Cookie component along > > with the > > Auth component (the famous remember me checkbox) > > //and you have saved the credentials inside cookie > > //you should delete the credentials from the cookie when > > you log out > > //noneed to verify if you have already saved the > > credentials inside > > cookie,noerror is thrown > > $this->Cookie->del($this->Auth->sessionKey); > > } > > return $this->Auth->logout(); > > > } > > > 2)your UsersController class logout() method should be now like this > > public function logout() { > > $this->redirect($this->_logout()); > > > } > > > 3)your UsersController class beforeFilter() method/callback should be > > now like this > > public function beforeFilter() { > > ... > > parent::beforeFilter(); > > //please specify the always allowed actions... logout should be the > > first one of course > > $this->Auth->allow > > ('logout','forgotpassword','resetpassword','activate','register'/* put > > here any other always-allowed action*/); > > if ($this->Auth->user()) { > > if (in_array($this->params['action'],array > > ('forgotpassword','resetpassword','register','activate'))) { > > //if you are forgetting your password, > > //if you resetting your password, > > //if you are registering as a new user, > > //or if you are activating you new accout via url > > //you should not be logged in ... yea this is logic > > $this->_logout(); > > } elseif($this->params['action']=='login') { > > //you are already logged in,noneed to login again > > $this->redirect($this->Auth->redirect()); > > } > > } elseif ($this->params['action']=='logout') { > > //you are already logged out,noneed to log out again > > $this->redirect($this->Auth->redirect()); > > } > > ... > > > } > > > now have a nice baking day.... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
