0

My site is set to immediately login a user after they register. I'm writing a plug-in which needs to fire wherever a user logs in.

If I order the wp_login hook, will this fire at user registration (which includes logging in)? Unfortunately the ref pages don't say anything specifically about this: https://developer.wordpress.org/reference/hooks/wp_login/

I know I can use the registration hook but prefer to avoid using extra how if I can help it. Is wp_login won't fire in above case, would wp_authenticate fire?

1 Answer 1

0

no, new user registration wont fire the wp_login by default. the only action hook that fire for new user registration is user_register.

But since you are auto logging user after registration, you should provide on how you achived this, if you are using a plugin for auto login, this depends if they call do_action('wp_logn', .........)

if you manually doing it on functions.php via user_register hook, then execute the do_action('wp_logn', .........)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.