Assign a user role in wordpress plugin Ultimate Member registration form depending on the entered email address

184 Views Asked by At

We use Ultimate Member for a customer section of a business website. Customers can register with their customer number and email address to get access to some downloads. To validate the registration process, I added a custom validation script to the fiels 'number' and a list of valid numbers and email addresses in the backend. Works fine so far!

How can I now add a rule to automatically assign a user role depending on the email address? For example, in my backend address list the entry has the flag 'IT-department', the role 'poweruser' is assigned. Otherwise the default rule.

1

There are 1 best solutions below

0
Sapient Hetero On

I have a problem similar to the one you've already solved. I'd like to send unique numbers to a known population via snail mail and have each user enter their number during registration to validate them. Would you consider sharing your custom validation script?