Skip to content

Commit

Permalink
logout() is debugged
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre Akay committed Jul 1, 2014
1 parent 3f917d8 commit 72c5596
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,20 @@ public function control( $perm_par ){

/**
* 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
*/
public function logout() {

$cookie = array(
'name' => 'user',
'value' => '',
'expire' => time()-3600,
'path' => '/',
);

$this->CI->input->set_cookie($cookie);

return $this->CI->session->sess_destroy();
}

Expand Down

0 comments on commit 72c5596

Please sign in to comment.