check_password

FILTER wp-includes\pluggable.php (ligne 2880) github
Filters whether the plaintext password matches the hashed password.
traduction française
Filtre si le mot de passe en clair correspond au mot de passe haché.

Paramètres

Entrée :
$check, $password, $hash, $user_id
Sortie :
@param bool       $check    Whether the passwords match.
@param string     $password The plaintext password.
@param string     $hash     The hashed password.
@param string|int $user_id  Optional ID of a user associated with the password.

Utilisation

Vérifier un mot de passe

Filtre pour vérifier.

security
add_filter('check_password', 'custom_password_check', 10, 4);
function custom_password_check($check, $password, $hash, $user_id) {
    return wp_check_password($password, $hash);
}

Actualités

Chargement des actualités...