lostpassword_errors

FILTER wp-includes\user.php (ligne 3271) github
Filters the errors encountered on a password reset request. The filtered WP_Error object may, for example, contain errors for an invalid username or email address. A WP_Error object should always be returned, but may or may not contain errors. If any errors are present in $errors, this will abort the password reset request.

Paramètres

Entrée :
$errors, $user_data
Sortie :
@param WP_Error      $errors    A WP_Error object containing any errors generated
@param WP_User|false $user_data WP_User object if found, false if the user does not exist.

Utilisation

// Modifier la valeur avec le filtre 'lostpassword_errors'
add_filter('lostpassword_errors', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($errors) {
    // Modifier la valeur
    return $errors;
}

Actualités

Chargement des actualités...