PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Automatically Logged In After Registration

  1. attorney
    Member

    This is something simple that isn't happening - after a user submits their registration and are redirected, they aren't logged in automatically. Most of the membership plugins I've had automatically login the user right after they submit their registration. Is there any way to enable this in the Gravity Forms Registration Addon as well?

    Posted 12 years ago on Thursday February 2, 2012 | Permalink
  2. Hi Attorney,

    Here is a snippet that will automatically log users in after they have registered. It requires a redirect to work correctly which is handled in the snippet. It will look for a redirect URL in the form settings first (confirmation redirect). If not found, it will redirect the user to the home page.

    http://pastie.org/3311813

    This code would go in your theme's functions.php file.

    Posted 12 years ago on Friday February 3, 2012 | Permalink
  3. attorney
    Member

    Thanks - I appreciate the effort. I pasted it in but unfortunately it didn't seem to work, at least not in IE9. I'm on a multisite install but the registration and login are on the same page. Don't think that is the issue, unfortunately just not logging in yet.

    Posted 12 years ago on Sunday February 5, 2012 | Permalink
  4. attorney
    Member

    Actually, I have two problems now -

    (1) The user is not being autologged in after registration.

    (2) I'm using a multisite install with the GF Registration add on. Unfortunately unlike stock Wordpress and other membership plugins, I'm finding that GF is not registering my users on all blogs. I'm using the wp multisite plugin and this works perfectly using the standard registration, S2Member and several other registration plugins. Is there a reason why GF doesn't seem to register users to all sites in a multisite? What is it doing differently during registration?

    Posted 12 years ago on Sunday February 5, 2012 | Permalink
  5. attorney
    Member

    Thanks for the code - I've just discovered the problem although no solution. Users are being collected by Gravity Forms but are unfortunately not being registered into the WP user database. Can't explain how this suddenly happened but after working perfectly for 3 days, this is why there is no autologin - because no user exists in WP.

    Posted 12 years ago on Monday February 6, 2012 | Permalink
  6. Hi Attorney,

    Could you send me a WP login and FTP access? I will take a look and see why the script is not working (send via Contact Us form, add ATTN David to your message).

    In regards to the User Registration Add-on not adding users to all your sites, this is not a support featured. Currently the User Registration Add-on adds the user to whichever site the user was registered from and if site creation is enabled, the user is added to this site as well. The upcoming version of the User Registration add-on allows you to specify whether or not the user should also be added to the site from which the user is registered.

    I did some double checking and adding the user to every site does not appear to be standard WordPress functionality. I added a new user from the Network admin and it created the user without assigning the user to any site. When adding a new user to a specific site, it adds the user only to that site.

    With all that said, you could replicate the functionality of these other plugins by writing a bit of custom code to add the user to every site in your network after the user is created via the gform_user_registered hook.

    Posted 12 years ago on Monday February 6, 2012 | Permalink
  7. attorney
    Member

    David - thanks for the quick reply. Regarding the registration problem, This is it:

    http://www.gravityhelp.com/forums/topic/cant-get-user-registration-to-work

    I'm avoiding it altogether and unchecked the "enable" box for "registration condition" as in this:

    http://www.gravityhelp.com/forums/topic/user-registration-not-working

    I'm avoiding this altogether and just created a required box to be check (checkbox with one option required) that says "I accept the user terms..." and if not checked, the form cannot be submitted. Done, problem solved, no hassles or creating values for checkboxes.

    Regarding the multiple user login and registration - I got that to work. It's the above registration issue that caused all the problems.

    Posted 12 years ago on Monday February 6, 2012 | Permalink
  8. Glad you were able to get this resolved. :)

    Posted 12 years ago on Monday February 6, 2012 | Permalink

This topic has been resolved and has been closed to new replies.