apply_filters( 'wp_authenticate_user', WP_User|WP_Error $user, string $password )
- Since
- 2.5.0
Filters whether the given user can be authenticated with the provided password.
Parameters
$userWP_User|WP_Error- WP_User or WP_Error object if a previous callback failed authentication.
$passwordstring- Password to check against the user.
Fired at · 2
wp-includes/user.php:203wp_authenticate_username_password()wp-includes/user.php:285wp_authenticate_email_password()
Source
* @since 2.5.0 * * @param WP_User|WP_Error $user WP_User or WP_Error object if a previous * callback failed authentication. * @param string $password Password to check against the user. */ $user = apply_filters( 'wp_authenticate_user', $user, $password ); if ( is_wp_error( $user ) ) { return $user; } $valid = wp_check_password( $password, $user->user_pass, $user->ID );History
Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.