Browse Source

logout() is debugged

develop
Emre Akay 11 years ago
parent
commit
72c5596865
  1. 11
      application/libraries/Aauth.php

11
application/libraries/Aauth.php

@ -286,11 +286,20 @@ class Aauth {
/** /**
* Logout user * Logout user
* Destroys the CodeIgniter session to log out user. * Destroys the CodeIgniter session and remove cookies to log out user.
* @return bool If session destroy successful * @return bool If session destroy successful
*/ */
public function logout() { public function logout() {
$cookie = array(
'name' => 'user',
'value' => '',
'expire' => time()-3600,
'path' => '/',
);
$this->CI->input->set_cookie($cookie);
return $this->CI->session->sess_destroy(); return $this->CI->session->sess_destroy();
} }

Loading…
Cancel
Save