mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 19:56:27 +09:00
Add new action 'wp_authenticate_username_password_before'
This commit is contained in:
@@ -286,3 +286,13 @@
|
||||
echo $ultimatemember->fields->display( 'login', $args );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove authenticate filter
|
||||
* @uses 'wp_authenticate_username_password_before'
|
||||
*/
|
||||
add_action('wp_authenticate_username_password_before','um_auth_username_password_before',10,3);
|
||||
function um_auth_username_password_before( $user, $username, $password ){
|
||||
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 );
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
add_filter('authenticate', 'um_wp_form_errors_hook_logincheck', 999, 3);
|
||||
function um_wp_form_errors_hook_logincheck( $user, $username, $password ) {
|
||||
|
||||
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 );
|
||||
do_action('wp_authenticate_username_password_before', $user, $username, $password );
|
||||
|
||||
if ( isset( $user->ID ) ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user