The following hooks are provided for User related events.
Executes just prior to a user being added to WHMCS. Changes to hook variables will not be honored.
| Variable | Type | Notes |
|---|---|---|
| user_id | int | The id of the user that has been added |
| firstname | string | |
| lastname | string | |
| string | ||
| password | string | |
| language | string |
No response supported
<?php
add_hook('PreUserAdd', 1, function($vars) {
// Perform hook code here...
});Executes as a user is being added to WHMCS.
| Variable | Type | Notes |
|---|---|---|
| user_id | int | The id of the user that has been added |
| firstname | string | |
| lastname | string | |
| string | ||
| password | string | |
| language | string |
No response supported
<?php
add_hook('UserAdd', 1, function($vars) {
// Perform hook code here...
});Executed when a change of password occurs for a user.
| Variable | Type | Notes |
|---|---|---|
| userid | int | The ID of the User being updated |
| password | string | The new password |
No response supported
<?php
add_hook('UserChangePassword', 1, function($vars) {
// Perform hook code here...
});Executes when a user is edited.
| Variable | Type | Notes |
|---|---|---|
| user_id | int | |
| firstname | string | |
| lastname | string | |
| string | ||
| olddata | array | An array of the previous user information |
No response supported
<?php
add_hook('UserEdit', 1, function($vars) {
// Perform hook code here...
});Executes upon successful completion of email verification by a user.
| Variable | Type | Notes |
|---|---|---|
| userId | int |
No response supported
<?php
add_hook('UserEmailVerificationComplete', 1, function($vars) {
// Perform hook code here...
});