Fires before the user is authenticated.
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).
Source
do_action_ref_array( 'wp_authenticate', array( &$credentials['user_login'], &$credentials['user_password'] ) );
Changelog
Version | Description |
---|---|
1.5.1 | Introduced. |
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.
Example migrated from Codex:
You can also use email to authenticate users in WordPress.