wp_authenticate_user WordPress Filter Hook

The wp_authenticate_user hook is called when a user is logging in. It allows you to authenticate the user and log them in. This hook is called before the user is logged in. If you return a WP_Error object, the user will not be logged in.

apply_filters( 'wp_authenticate_user', WP_User|WP_Error $user, string $password ) #

Filters whether the given user can be authenticated with the provided password.


Parameters

$user

(WP_User|WP_Error)WP_User or WP_Error object if a previous callback failed authentication.

$password

(string)Password to check against the user.


Top ↑

More Information

This hook should return either a WP_User() object or, if generating an error, a WP_Error() object.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More