NetUserValidate2 or Net32UserValidate2

The NetUserValidate2 API validates a user ID with its password, and checks whether there are any logon restrictions for this user account. If the specified user account is not found, this API attempts to validate the guest account, instead. If this happens, all verification checks will be based only on the guest account. If the call completes successfully, a user_logon_info_1 structure is returned in the same input buffer and the code is set appropriately.

The NetUserValidate2 API replaces the NetUserValidate API, which is now obsolete.