Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
Guide to Standardized Hooks - Passwd Functions - Developer Documentation - cPanel Documentation
Child pages
  • Guide to Standardized Hooks - Passwd Functions
Skip to end of metadata
Go to start of metadata

Introduction

The Passwd category's events occur when a WHM user or a cPanel user changes a cPanel user's password. These events trigger during the use of the following interfaces:

These events also trigger during the use of the following API functions:


Note:

In cPanel & WHM version 54 and earlier, cPanel's Password & Security interface interface was the Change Password interface. 

ChangePasswd

This event takes place when a user's password changes.

Available Stages:

  • pre — Hook action code runs before the password changes.
  • post — Hook action code runs after the password changes.

Action Code Runs As:

  • During transfers, the root user.
  • While the system generates backup files, the user who owns the backup.

Blocking Attribute:

Escalate Privileges Attribute:

Returns

Note:

The chosen stage determines the event's returns. Select the appropriate tab to view returns for that stage. 

ReturnTypeDescriptionPossible valuesExample
userstringThe user for whom the password will change.A valid username on the server.username
new_passwordstringThe user's new password.A secure password.12345luggage
ReturnTypeDescriptionPossible valuesExample
userstringThe user for whom the password will change.A valid username on the server.username
new_passwordstringThe user's new password.A secure password.12345luggage
rawoutstringThe event's raw output.A string value.This is raw output.
appliststringA list of applications for which the password changed.A list of one or more application names.application1,application2