when people register, can they login to through my theme pages as well?
when people register, can they login to through my theme pages as well?
Hi Weathetop,
This post will be helpful for logging the user in as part of the registration:
http://www.gravityhelp.com/forums/topic/automatically-logged-in-after-registration#post-48309
Thanks for the link to the auto login code. I was wondering if the purpose of the line:
remove_action("gform_post_submission", array("GFUser", "gf_create_user"));
is to bypass a redirect so it can be handled by the autologin function?
Hi David,
That line is used because currently the function that creates the user in the User Registration feed is currently tied to the deprecated "gform_post_submission" hook. This is because we did not want to increase the GF version requirement on the User Registration add-on immediately but it will happen eventually. So basically the code in the other thread unbinds the "gf_create_user()" function from the "gform_post_submission" hook and then binds it to the "gform_after_submission" hook so that it is fired at the same time every time.
Ah... that makes so much more sense now. It wasn't obvious what was going on with unbinding one hook and binding to another for the purpose of auto login. I saw that gform_post_submission was called if $confirmation["redirect"] is true. However, after reviewing this again when I wasn't half asleep, I now see the redirection would not be prevented even if unbinding from gform_post_submission.