WPDev.one
Core Function
View Source on Trac ↗

wp_authenticate_username_password()

wp_authenticate_username_password( mixed $user, mixed $username, mixed $password )

Authenticates a user, confirming the username and password are valid.

Parameters 3 required

Name / Type Description
(WP_User

| WP_Error | null) $user WP_User or WP_Error object from a previous callback. Default null.

Required
$username
string

Username for authentication.

Required
$password
string

Password for authentication.

Required

Return Value

((WP_User)
| WP_Error) WP_User on success, WP_Error on failure.

Function Information

Since Version
2.8.0
Source File
wp-includes/user.php
Advertisement