wp_authenticate_user filter hook skipped
-
Hi,
First of all: I like this plugin a lot! Good job!
There are however some small things. I use other plugins that use the wp_authenticate_user filter hook. This hook is used to perform additional validation/authentication any time a user logs in to WordPress.
When logging in with the Social Login, this code isn’t executed. In my case this is a plugin that I use to approve users.
I looked into the code and I managed to fix it. However, I don’t know if this is the best way.
In communications.php I changed:
wp_set_auth_cookie ($user_data->ID, true); do_action ('wp_login', $user_data->user_login, $user_data);
in
$user = apply_filters('wp_authenticate_user', $user_data); if ( !is_wp_error($user) ) { wp_set_auth_cookie ($user_data->ID, true); do_action ('wp_login', $user_data->user_login, $user_data); }
The original function
do_action ('wp_login', $user_data->user_login, $user_data);
is obsolete by the way.This seems to work. Can this be validated and added to the original source?
Kind regards,
Rob
- The topic ‘wp_authenticate_user filter hook skipped’ is closed to new replies.