Auth::logout()

Auth::logout() – logout an authenticated user

Synopsis

void Auth::logout ( )

Description

Logout any currently logged in user.

Example

<?php
//$a is our Auth object
$a->start();

if (isset(
$_GET['action']) && $_GET['action'] == 'logout'
    
&& $a->checkAuth()
) {
    
$a->logout();
    
$a->start();
}
?>
list available users (Previous) remove a user account (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by: kbailey@freewayprojects.com
Just thought I'd mention that the logout function does not seem to unset the $_SESSION variables.

To unset all $_SESSION variables I used

session_unset();

just before the

a->logout();

call.

Please see

http://uk2.php.net/manual/en/function.session-unset.php

for details RE using session_unset().