Filters whether a set of user login credentials are valid. A WP_User object is returned if the credentials authenticate a user. WP_Error or null otherwise.
Filtre si un ensemble d'identifiants de connexion d'un utilisateur est valide. Un objet WP_User est retourné si les identifiants authentifient un utilisateur. WP_Error ou null dans le cas contraire.
N/A
Sortie :
@param null|WP_User|WP_Error $user WP_User if the user is authenticated. @param string $username Username or email address. @param string $password User password. @param string $username Username or email address. @param WP_Error $error A WP_Error object with the authentication failure details.
add_action('wp_logout', 'clear_user_session');
function clear_user_session() {
$user_id = get_current_user_id();
delete_transient('user_temp_' . $user_id);
error_log('User ' . $user_id . ' logged out');
}
Chargement des actualités...