do_action_ref_array( 'wp_authenticate', string $user_login , string $user_password )
Fires before the user is authenticated.
Contents
Description
The variables passed to the callbacks are passed by reference, and can be modified by callback functions.
Parameters
- $user_login
-
(string) Username (passed by reference).
- $user_password
-
(string) User password (passed by reference).
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.
Source
File: wp-includes/user.php
Changelog
Version | Description |
---|---|
1.5.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
To actually modify the values, it’s necessary to use ampersands in the callback function declaration:
Example migrated from Codex:
You can use wp_authenticate action hook to implement a custom login mechanism before you involve WordPress.
Expand full source codeCollapse full source code
Example migrated from Codex:
You can also use email to authenticate users in WordPress.