Auth::setLogoutCallback()

Auth::setLogoutCallback() – set a callback for successful logout attempts

Synopsis

void Auth::setLogoutCallback ( string $loginCallback )

Description

This function sets a callback function which is called upon successful logout of a user account.

The callback function will be passed two parameters, the username that successfully logged out and a reference to the Auth object.

Parameter

string $loginCallback

the call back function to use

Note

This function can not be called statically.

set a callback for successful login attempts (Previous) set a custom name for the Auth session variable (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: spider312@free.fr
Note that if you die() in this callback, logout procedure won't finish, and you won't be logged out

If you want to die on logout, you'll have to check authentification after logging out, and then die if it isn't ok