Gform_user_registered not firing for autologin [RESOLVED]

I’ve setup User Registration addon, set it to create user on form submission.

for some reason the action hook gform_user_registered is never reached/run even though a “user” gets created in pending activations. I want to autologin the user and have done so successfully on other sites. But this site is not taking it.

I’ve tried adding this code (https://docs.gravityforms.com/gform_is_feed_asynchronous/#disable-for-user-registration-auto-login) and can confirm that it runs (sending output to error_log) but still my gform_user_registered method doesn’t fire at all.

I’ve went through all the steps in troubleshouting, enabled Twenty Twenty-Three theme and disable all but GF plugins but still no luck.

GForm logging isn’t helpful, no errors. The one thing that I did notice is that the meta doesn’t show me the user entered password, but that might just be a security measure.

Any ideas to get this working?

for some reason the action hook gform_user_registered is never reached/run even though a “user” gets created in pending activations.

That hook doesn’t run when the pending activation is created, it only runs once the user has been activated either by the user using the activation link in an email, or when an administrator activates the user from the entry detail page or pending activations list.

1 Like

I checked the site that I assumed it worked before and it seems it doesn’t work there either. A bit confusing because I genuinely thought it did.

Maybe I should phrase my question otherwise then: Is it possible to login users immediately after the form has been submitted, WITHOUT the activation email or an administrator activating the user?

You’ll need to disable the activation feature on the feed, so the user is created as soon as the feed is processed, and use the gform_is_feed_asynchronous filter to disable background processing.

1 Like

I did what you said and that works! Thanks for answering so quickly.

As a sidenote I’d like to say that the explanation on the “Enable User Activation” checkbox is a bit confusing to me. It did not occur to me to keep it unchecked because I thought that would need admin activation as a default.