Authentication
The following hooks are provided for Authentication related events.
ClientLoginShare
Executes as part of client login if user does not exist.
Parameters
| Variables | Type | Notes |
|---|---|---|
| Username | string | |
| Password | string | |
| status | string | NotExist, ExistPassInvalid |
Response
Return data of username, password and status.
status
NotExist: Customer Account doen't exist
ExistPassInvalid: Customer given password mismatch
Example Code
add_hook('ClientLoginShare', 1, function($vars) {
// Perform custom authentication logic here
});UserLogin
Executes when a user logs in.
Parameters
| Variables | Type | Notes |
|---|---|---|
| user_id | int | |
| username | string |
Response
No response supported.
Example Code
add_hook('UserLogin', 1, function($vars) {
// Perform hook code here...
});UserLogout
Executes when a user logs out.
Parameters
| Variables | Type | Notes |
|---|---|---|
| user_id | int |
Response
No response supported.
Example Code
add_hook('UserLogout', 1, function($vars) {
// Perform hook code here...
});