wp_authenticate WordPress Action Hook

The wp_authenticate hook is called whenever a user tries to log in to WordPress. It allows you to authenticate the user using your own custom code. If you return a WP_Error object, the user will be shown an error message.

do_action_ref_array( 'wp_authenticate', string $user_login, string $user_password ) #

Fires before the user is authenticated.


Description

The variables passed to the callbacks are passed by reference, and can be modified by callback functions.


Top ↑

Parameters

$user_login

(string)Username (passed by reference).

$user_password

(string)User password (passed by reference).


Top ↑

More Information

This action is located inside of wp_signon(). In contrast to the wp_login action, it is executed before the WordPress authentication process.

This action hook is not to be confused with the wp_authenticate() pluggable function.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.1Introduced.

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