Description
Checks a user's login information and logs them in if it checks out.
- This is a plugabble function, which means that a plug-in can override this function.
- Not to be confused with the wp_authenticate action hook.
Parameters
- $username
- (string) (required) User's username
- Default: None
- $password
- (string) (required) User's password
- Default: None
Return Values
- (mixed)
- Returns WP_User object if login successful, otherwise WP_Error object.
Errors can be verified with is_wp_error()
Change Log
Since: 2.5.0
Source File
wp_authenticate() is located in wp-includes/pluggable.php