random_password WordPress Filter Hook

The random_password hook allows you to set a randomly generated password for a user. This can be useful for setting up a new user or for resetting a password for an existing user.

apply_filters( 'random_password', string $password, int $length, bool $special_chars, bool $extra_special_chars ) #

Filters the randomly-generated password.


Parameters

$password

(string)The generated password.

$length

(int)The length of password to generate.

$special_chars

(bool)Whether to include standard special characters.

$extra_special_chars

(bool)Whether to include other special characters.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0Added the $length, $special_chars, and $extra_special_chars parameters.
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More