In a standard installation of Joomla! 1.5 we have several predefined events which, when triggered, call functions in the associated plugins. For more information on plugins, look here.
The user events are divided into two parts. First we have the events used while authentication of a user takes place:
*onLoginUser *onLogoutUser *onAuthenticate *onAuthenticateFailure
Second we have the events triggered during user management:
*onBeforeStoreUser *onAfterStoreUser *onBeforeDeleteUser *onAfterDeleteUser
This event is triggered after the user is authenticated against the Joomla! user-base.
If one plugin returns false, the entire authentication process fails. (needs verification)
* $user - an associative array of JAuthenticateResponse type (see link for array keys) * $options - an associative array containing these keys: ["remember"] => bool, ["return"] => string, ["entry_url"] => string
This event is triggered before the user is logged out of the system.
If one plugin returns false, the global logout fails. (needs verification)
* $credentials - an associative array containing these keys: ["username"] => string, ["id"] => int * $options - an associative array containing this key: ["clientid"] => int
This event is triggered to verify that a set of login credentials is valid.
Array of credentials. Structure:\\ ['username']\\ ['password']\\ Alternative authentication mechanisms can supply additional credentials.
An array of JAuthenticateResponse objects detailing the results of each called plugin, including success or failure.
*libraries/joomla/application/user/authentication.php *plugins/authentication/gmail.php *plugins/authentication/joomla.php *plugins/authentication/ldap.php
This event is triggered whenever a user authentication request is failed by any plugin.
Two parameters. The credentials array for the user (see onAuthenticate), and the JAuthenticateResponse that caused the failure.
Unknown. The return value appears to be ignored in any case.
This event is triggered before an update of a user record.
* $user - An associative array of the columns in the user table (current values). * $isnew - Boolean to identify if this is a new user (true - insert) or an existing one (false - update)
Note; You can retrieve the values that are about to get updated with JFactory::getUser();
* $user - An associative array of the columns in the user table. * $isnew - Boolean to identify if this is a new user (true - insert) or an existing one (false - update) * $success - Boolean to identify if the store was successful * $msg - Error message if store failed
Note; The old values that was just updated, is not available here/afterwards. In that case use onBeforeStoreUser()
The event is triggered when a user is about to be deleted from the system.
An associative array containing user information. Structure:\\ ['id']\\
The event is triggered after a user has been deleted from the system.
Three parameters: user information, delete result, and error result. User information is an associative array. Structure:\\ ['id']\\ Delete result is boolean true if the delete succeeded or an error message on failure.\\ Error result is a JError object detailing the error, if any.