February 20, 2020: Fixed issues caused by failure to return
November 16th, 2015: Update to work with GFUR v3.0.beta1+. Props to GF team member Richard Vav.
If you’re using the Gravity Forms User Registration Add-on, this snippet will allow you to skip registration for users who are logged in when they submit the form.
This snippet was written to assist a fellow who had configured a form that allowed users to optionally register an account on the site. This much is handled out of the box by the GF User Registration Add-on.
The issue arose when users, who opted to create an account on their initial submission, neglected to click the checkbox which opted them out of creating an account on their subsequent submissions. This resulted in a validation error; the submitted email was already registered to a user on the site!
Of course it was! It is the very email the user previously created an account with. The solution? If the user is logged in skip the registration completely. Be sure to display a message somewhere on your form instructing users to login if they already have an account.