authenticate

FILTER wp-includes\PHPMailer\SMTP.php (ligne 515) github
Perform SMTP authentication. Must be run after hello().
traduction française
Effectue l'authentification SMTP. Doit être exécuté après hello().

Paramètres

Entrée :
$username,
        $password,
        $authtype = null,
        $OAuth = null
Sortie :
@param string $username The user name
@param string $password The password
@param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
@param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication
@return bool True if successfully authenticated

Utilisation

Filtrer l'authentification utilisateur

Filtre pour modifier le processus d'authentification.

users security
add_filter('authenticate', 'custom_authentication', 30, 3);
function custom_authentication($user, $username, $password) {
    if (!empty($user)) return $user;
    if (empty($username) || empty($password)) {
        return new WP_Error('empty_credentials', 'Username and password required');
    }
    return $user;
}

Actualités

Chargement des actualités...