Perform SMTP authentication. Must be run after hello().
Effectue l'authentification SMTP. Doit être exécuté après hello().
$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
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;
}
Chargement des actualités...