Auth::setLoginCallback() – set a callback for successful login attempts


void Auth::setLoginCallback ( string $loginCallback )


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

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


string $loginCallback

the call back function to use


This function can not be called statically.

set maximum idle time for authentication (Previous) set a callback for successful logout attempts (Next)
Last updated: Sun, 04 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

Note by:
The example isn't correct - us this instead:
setLoginCallback(array($this, 'callback'));