Change User Passwordfor WHMCS · Documentation
v2.4.1

How It Works

The modal endpoints, the password-update flow and the email merge fields.


Password-update flow

  1. An admin clicks Change Password in the Manage Users dropdown, or uses the input on the profile tab.
  2. The modal loads with the user’s name and email and a password field with a generator.
  3. On save, the password is updated and an audit row is written.
  4. If the checkbox is ticked, the Change User Password email is sent with the user_password merge field.

Endpoints

All endpoints live on addonmodules.php?module=ChangePassword, are addressed root-relative and require POST plus a CSRF token.

ActionPurpose
a=indexServes the Change Password form as AJAX {body} markup, for a given userid.
a=storePersists the new password.
a=passwordGenerates a random password sized to the configured length and character types.
Direct GET is rejected — opening an endpoint in the browser returns the WHMCS HTTP Method Not Allowed page. That is expected and matches core WHMCS routes.

What the hooks do

  • Profile field — swaps the disabled password input for a working one with a generator button.
  • Manage Users action — appends Change Password to the user dropdown.
  • Admin header output — loads the script that powers the generator and the modal.
  • Daily cron — prunes activity-log rows older than the retention setting.

Email merge fields

The seeded template supports {$user_first_name}, {$user_email}, {$user_password}, {$whmcs_link} and {$signature}.