wppaste
WordPress

do_action_ref_array( 'check_passwords', string $user_login, string $pass1, string $pass2 )

Since
1.5.1
Fires before the password and confirm password fields are checked for congruity.

Compatibility

WordPress
since 1.5.1
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$user_loginstring
The username.
$pass1string
The password (passed by reference).
$pass2string
The confirmed password (passed by reference).

Where this hook fires · 1

  • wp-admin/includes/user.php:174edit_user()

Source code

	 * @since 1.5.1	 *	 * @param string $user_login The username.	 * @param string $pass1     The password (passed by reference).	 * @param string $pass2     The confirmed password (passed by reference).	 */	do_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); 	// Check for blank password when adding a user.	if ( ! $update && empty( $pass1 ) ) {		$errors->add( 'pass', __( '<strong>Error:</strong> Please enter a password.' ), array( 'form-field' => 'pass1' ) );	}

Changelog

Introduced in 1.5.1. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.