Function: user_pass_ok

user_pass_ok( string $user_login, string $user_pass )

Check that the user login name and password is correct.

Parameters

Name Type(s) Default Value Description
$user_login string

User name.

$user_pass string

User password.

Returns

boolean

False if does not authenticate, true if username and password authenticates.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.