• Hello,

    I have two different types of users, Customers and Wholesalers. I have already created these two different user roles and they have different access permissions setup for each.

    I have a text field in the registration form called “Wholesale Activation Code”.

    What’s the best way to check that field against a set parameter and assign the user role for that user if they put in the correct code?

    Thanks for the help.

    https://www.ads-software.com/plugins/wp-members/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter anotherguy

    (@anotherguy)

    Alternatively, I could create two different forms. One for Wholesalers that would be sent directly from the Account Manager, and one for Retail Customers. If the user fills out the Wholesale form, they are automatically set as a Wholesale User Role.

    I could create a checkbox field that is hidden on the regular User registration form, but shows on the Wholesale form pre-checked.

    So really, my question is only regarding how to assign a user to a specific role based on a field. I don’t really need to check it back against a set parameter.

    Plugin Author Chad Butler

    (@cbutlerjr)

    While there are a number of filter and action hooks in the WP-Members registration process, I would probably use the wpmem_register_data filter. It receives all of the user’s posted registration data and you can directly filter based on whatever data is in the form.

    Hi @anotherguy,
    what plugin have you used for creating and editing new roles to combine with wp-members?

    In my case I have to create 2 user roles and 2 registration page with different form fields. How can I setup this configuration?

    Thanks for the help,
    Maurizio

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set Customer User Role based on custom registration field content’ is closed to new replies.