php - cakephp session is not deleting without clearing cache -
upon logout, cakpphp session not being deleted.in logout function have logged out user facebook . after calling logout function logs out user facebook not website. log out site have click on logout button , clear cache (ctrk+r) logout working. can tell me wrong.
function logout() { $this->session->delete("session_user"); $this->session->delete('logout'); $this->redirect(base_url); }
try doing:
function logout() { $this->session->destroy(); $this->redirect($this->auth->logout()); }
and add (if not added) in beforefilter()
method::
$this->auth->allow('logout');
Comments
Post a Comment