J1.5

Plugin/Events/User

From Joomla! Documentation

This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

5.3.4.5 Examples

5.3.5 onLoginFailure

5.3.5.1 Description

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

5.3.5.2 Parameters

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

5.3.5.3 Return Value

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

5.3.5.4 Used in files

*libraries/joomla/application/user/authentication.php

5.3.6 onBeforeStoreUser

5.3.6.1 Description

This event is triggered before an update of a user record, or when a new user is about to be stored in the database.

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

5.3.6.2 Parameters

Two parameters:

*An associative array of the columns in the user table.
*A unique identifier for this user.
*Boolean to identify if this is a new user (insert) or an existing one (update)

5.3.6.3 Return Value

None

5.3.6.4 Used in files

*libraries/joomla/user/user.php

5.3.6.5 Examples

*plugins/user/example.php

5.3.7 onAfterStoreUser

5.3.7.1 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'].

5.3.7.2 Parameters

Four parameters:

*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

5.3.7.3 Return Value

None

5.3.7.4 Used in files

*libraries/joomla/user/user.php

5.3.7.5 Examples

*plugins/user/example.php

5.3.8 onBeforeDeleteUser

5.3.8.1 Description

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

5.3.8.2 Parameters

5.3.8.3 Return Value

5.3.8.4 Used in files

5.3.8.5 Examples

*plugins/user/example.php

5.3.9 onAfterDeleteUser

5.3.9.1 Description

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

5.3.9.2 Parameters

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.