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.

User registerd with code into a role

  1. geod
    Member

    Good day -
    Is it possible or what would be the best way to:
    Concept: Have a user with a code fill out a registration form adding the code and then be placed into the role matching that code.

    For example -
    I am setting up a club site. When people from different Club Names (code) come to the site and sign up they need to enter the club name in a field and go to the unique user role associated with that Club Name. There they will be showed unique content etc...

    Is there a way to do that? Any suggestions welcome please. Really appreciate it!

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  2. You could do this with one form and multiple User Registration feeds. You can enable a "registration condition' where you can say, in effect, "If code entered was 'this', register the user." You would create one feed for each code, and enable the registration condition to run this feed only when this code is entered. Then, in each feed, the default role is different. So, if you have four codes, you would have 4 feeds, each with a registration condition dependent on that value being entered, and each feed would have a different role.

    You probably need a catch-all role too for anyone who did not enter a code or whose code was incorrect.

    Posted 11 years ago on Friday February 22, 2013 | Permalink
  3. geod
    Member

    Thank You Chris. I am going to look this over next week and get it going. Have a happy weekend and your help is much appreciated.
    -geod

    Posted 11 years ago on Friday February 22, 2013 | Permalink
  4. Let us know if you get stuck and we'll provide pointers where we can.

    Posted 11 years ago on Friday February 22, 2013 | Permalink
  5. geod
    Member

    Got a bit stuck.
    I've created the form with a required single line text field called "Code". Added the required Username/Email Address as well as password.
    Created the Feed with the Action to Create User > Selected Correct Form > Created the Role > Mapped the User Settings Fields correctly. Checked Send Email/User Activation. Enabled the Registration Condition with the setting "Register the user if Code is Test".

    Everything goes well until the user activates the link in their activation email. Then they are redirected to the site and it says "An error occurred. Could not create user."
    I get the same failure if I go and attempt to try to activate them on the Pending Activations tab - fails.

    If I turn off the Registration Condition everything works - the user is created and goes to the correct role. So I know the error is in the Registration Condition. What do you think?
    Let me know and thanks again a bunch.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  6. Which version of the User Registration add-on are you using? And which version of WordPress and Gravity Forms do you have installed?

    I have a logging add-on I can send to you which may help debug this. Please send and email to chris@rocketgenius.com if you would like a copy of it.

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  7. geod
    Member

    I've got
    WP 3.5.1.
    GF 1.6.12
    Registration 1.5 Beta1

    Oh! It's the Beta probably/ Ok I turned off the beta went to 1.4 and it worked... However the beta has SIGNIFICANT improvements and I really need that one to work. The earlier one won't be able to do the task! Will send you an email for that debug. Appreciate it.

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  8. Please send an email to chris@rocketgenius.com and include a link to this topic. I can send you the logging add-on and an updated beta version of the User Registration add-on.

    Posted 11 years ago on Thursday February 28, 2013 | Permalink