wp_authenticate
wp_authenticate ( $username, $password )
Parameters:- (string) username User's username or email address.
- (string) password User's password.
Returns:- (WP_User|WP_Error) WP_User object if the credentials are valid, otherwise WP_Error.
Defined at:Change Log: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Authenticates a user, confirming the login credentials are valid.