What does it do?
The Auto Login perk allows you to automatically log the user in after they have registered (via a Gravity Form) to your site. Additionally, this perk maintains the existing form confirmation allowing you to display a text confirmation, redirect to a WordPress page, or redirect to a URL with no additional effort.
How do I enable this functionality?
This perk requires the User Registration Add-On for Gravity Forms. Assuming this add-on is installed and activated, go ahead and navigate to the User Registration page.
On the User Registration page, create a new registration feed as you normally would or edit an existing feed. Scroll to the bottom of your feed and look for the “Auto Login” option within the “Additional Options” group. Check the corresponding checkbox to enable the Auto Login functionality for this feed. With this option enabled, any user that is registered from this feed, will automatically be logged in when the form is submitted.
You’ve setup a PayPal Standard feed and enabled the “Delay User Registration” option. Here’s why this won’t work with GP Auto Login.
When the user returns to your site from PayPal, Gravity Forms does not actually know if the payment has been completed yet and therefore the user has not yet been registered. GP Auto Login cannot automatically log in the user until they are registered by the Gravity Forms User Registration add-on.
PayPal notifies Gravity Forms when the payment is completed in a separate process called an IPN notification. In some cases, this IPN notification can happen instantly. In most cases, there is a minute or two delay. The trickiest part though is that this is a separate process, unattached to user’s current browsing session.
Redirecting After Login
The auto login functionality happens behind the scenes and the form’s configured confirmation settings are not impacted by enabling this feature. If you would like to redirect the user to another page after they have been automatically logged in, you can configure the URL to which the user should be redirected on the “Confirmation” tab of your Form Settings.
How does this work with GF User Registration “Pending Activations”?
With GP Auto Login v1.2, auto-login after the user has activated their account is now automatically supported (assuming the option is checked on the User Registration feed). There is one caveat. The default activation template packaged with Gravity Forms (and modeled after WordPress’ version) does not give any indication that the user is logged in.
If you’d like to create your own template that gives the user a confirmation of some sort, you can do so with this handy Gravity Wiz resource: