Request passphrase at user registration and automatically assign role to user Is there a module that would allow us to request an optional predefined pass-phrase/password at user registration?

So if the user fills in the pass-phrase he would be registered as a premium user or something, if not he would be set as a simple authenticated user.

By the way, I'm using Drupal 7.
Use the Rules module to implement such feature, as further detailed  below.

Step 1: Add a field to the registration form, which wil be used to have a user enter your passphrase. Even though you can use any "machine name" for that field, let's assume you call it "field_optionlist"

Step 2: Use a variation of the Rule included in my answer to "How to specify a Rules condition related to select list values?". Here is what you should tune in that rule:


Replace the Rules event to something like "After a new user submits a registration request"
Replace the "Value C" in the Rules condition to the value of your passphrase
For debugging reasons, start with a Drupal message to be shown (imilar to the rule mentioned above. After the message shows up as you want it to show, replace the Rules Action with something like "Assign role to user".