In a standard installation of Joomla! 2.5 we have several predefined events which, when triggered, call functions in the associated plugins.

The user events are divided into two parts. First we have the events used while authentication of a user takes place:

Second we have the events triggered during user management:

[edit] onUserLogin

[edit] Description

This event is triggered after the user is authenticated against the Joomla! user-base.

If you need to abort the login process (authentication), you will need to use onAuthenticate instead.

[edit] Parameters

[edit] Return Value

Boolean

[edit] Used in files

[edit] Examples

[edit] onUserLogout

[edit] Description

This event is triggered before the user is logged out of the system. If one plugin returns false, the global logout fails. (needs verification)

[edit] Parameters

[edit] Return Value

Boolean

[edit] Used in files

[edit] Examples

[edit] onUserAuthenticate

[edit] Description

This event is triggered to verify that a set of login credentials is valid.

[edit] Parameters

Array of credentials. Structure:\\ ['username']\\ ['password']\\ Alternative authentication mechanisms can supply additional credentials.

[edit] Return Value

An array of JAuthenticateResponse objects detailing the results of each called plugin, including success or failure.

[edit] Used in files

[edit] Examples

[edit] onUserLoginFailure

[edit] Description

This event is triggered whenever a user authentication request is failed by any plugin.

[edit] Parameters

Two parameters. The credentials array for the user (see onAuthenticate), and the JAuthenticateResponse that caused the failure.

[edit] Return Value

Unknown. The return value appears to be ignored in any case.

[edit] Used in files

[edit] onUserBeforeSave

[edit] Description

This event is triggered before an update of a user record.

Password in $user array is already hashed at this point. You may retrieve the cleartext password using $_POST['password'].

[edit] Parameters

Note; You can retrieve the values that are about to get updated with JFactory::getUser();

[edit] Return Value

None

[edit] Used in files

[edit] Examples

[edit] onUserAfterSave

[edit] Description

This event is triggered after an update of a user record, or when a new user has been stored in the database.

Password in $user array is already hashed at this point. You may retrieve the cleartext password using $_POST['password'].

[edit] Parameters

Note: The old values that were just updated are not available here or afterwards. In case you need the old values, use onBeforeStoreUser().

[edit] Return Value

None

[edit] Used in files

[edit] Examples

[edit] onUserBeforeDelete

[edit] Description

The event is triggered when a user is about to be deleted from the system.

[edit] Parameters

[edit] Return Value

None.

[edit] Used in files

[edit] Examples

[edit] onUserAfterDelete

[edit] Description

The event is triggered after a user has been deleted from the system.

[edit] Parameters

[edit] Return Value

None.

[edit] Used in files

[edit] Examples

License: Joomla! Electronic Documentation License
Source page: http://docs.joomla.org/Plugin/Events/User
Page retrieved: 0.209 seconds, 2.19 MB

Top