apply_filters( 'authenticate', null|WP_User|WP_Error $user, string $username, string $password )

Filters whether a set of user login credentials are valid.


Description

A WP_User object is returned if the credentials authenticate a user. WP_Error or null otherwise.


Parameters

$user

(null|WP_User|WP_Error) WP_User if the user is authenticated. WP_Error or null otherwise.

$username

(string) Username or email address.

$password

(string) User password


Source

File: wp-includes/pluggable.php

View on GitHub



Changelog

Changelog
Version Description
WP-4.5.0 $username now accepts an email address.
WP-2.8.0 Introduced.