Integrating Gravity User Registration with Restrict Content Pro

Use Case:

On the original site, the membership plugin used was pretty unwieldy, didn’t let excerpts show and we had a huge issue with spam registrations. The goals for the re-design was to still restrict content to logged in users; but allow excerpts to show to everyone, including search engines and make the registration/verification process easier.

I also needed a pretty complicated registration form, so I wanted to use Gravity Forms to build it. These are the steps I took to combine the ease of building a form with Gravity, registering new users for the site and connecting it to Restrict Content Pro membership.

  • Site needs about 80% of its content restricted from non-registered users, but we still want the excerpts to show.
  • Need users at several distinct levels –
    • Trial – full read access for a limited time
    • Member – full read access, unlimited time
    • Shopper – full read access, unlimited and see “buy now” buttons in Woo shopping cart.
  • All users are free, there is no payment – the Gravity form will not work if payment is involved in initial registration
  • All users start with a Trial 5 day subscription, but get moved to full member manually by the business office after they have been verified.
  • Plugins needed:
    • RCP (developers license)
    • Gravity Forms (developers license)
    • Registration form add-on for Gravity
  • For Shopping restrictions:
    • WooCommerce
    • WooCommerce Catalog Visibility Options (this works based on user role)

Setup Restrict Content Pro

  • Restrict>Settings
    • General – Add license key
    • Messages – These are what show up when user is not logged in or registered, premium is all that’s needed. This text can be formatted with CSS classes if desired.
    • Sign-up form and Emails – become moot, this is what Gravity is taking over
  • Restrict>Subscription Levels
    • Add a Trial subscription with a limited amount of days*
      • *Because we’re using Gravity to add the user, the date limit doesn’t work here. See Gravity User Registration notes.
    • Add a regular subscription, unlimited – both of these are Subscriber level
    • Added a 3rd level for U.S. shoppers, role of customer (from WooCommerce)

Setup Gravity registration form – add RCP fields in the add-on section.

  • Forms>new form
    • Create user registration form with desired fields
    • At the end of the form, add 3 hidden fields
  • RCP Status, Default value ‘active’ (status of free works, but does not allow the users to actually see content once logged in!)

RCP sttus

  • GF active statusSave form, make sure it’s active (green in list view) and add a Confirmation
  • Under Notifications, make sure Admin notification is turned on as well; this is what will send you the form. You can add an additional thank you email here if you want.
  • Forms>User Registration
    • Action is Create user, assign the form you just created
    • Assign the User settings
    • Add the User Meta, this is the 3 hidden fields you added.
    • This is where you can force user activation via email as well. This single check box saves the business office from having to weed through thousands of junk registrations. If the account wasn’t activated by a human with a real email address, then it doesn’t exist in the system and the form can be ignored.User registration settings

Activate users procedure

  • A user fills out the registration form and the office gets the form via the Admin notification.
  • Until the user activates the account, they do not show up in the Users or Members list, making verifications easier for the business office and spam registrations a non-issue.
  • Once the account shows up, the office goes through their verification procedure and either deletes the user account or upgrades them to full membership