I would like some help with the following issue. In Drupal 7, I want to activate a newly registered user when his email id is saved in a content field.

I have created a content type email. Now whenever a new user registers, I need to check his email id with the existing emails. If a match is found, then that user should be activated by default and the new user should be blocked.

I have tried to use the rule module, but after saving new account in the condition it's not comparing the email id with node field. Is there any other module which could accomplish this? Or any other method to do this?

  • 3
    You'll probably need to provide a little more detail in order to get a good response... Some examples: Who creates the email node(s)? Or is there only one node that contains each email address? Who adds the allowed email address to that content? What happens if a user registers and their email is not in the list? i.e. do you want to block user accounts whose emails aren't in the list? Or prevent them from registering altogether? Stuff like that.
    – jerdiggity
    May 25, 2013 at 19:58
  • Hi First of all thanks for your quick response . steps as follows: there will be a content type email with a field email id. Admin creates some email nodes, Then when new user registers to the site his email id should be compare to the node/list if match is not found then that user will be blocked.else activate
    – Laveena
    May 26, 2013 at 5:04

1 Answer 1


Is there any other module which could accomplish this? Or any other method to do this?

If you've tried the Rules module and it's not working for you for one reason or another, another option/method would be to try something like the Invite module.

I don't know what your reasoning is behind the email nodes (not that it's a bad thing... I just don't know if you save other info there or if you're just looking for a method to store email addresses), but if your reasoning is in fact solely to have a place to store a bunch of authorized email addresses, then the Invite module should do the trick.

Additionally, from what I can tell there have been some improvements made in the D7 version which sound like they might be able to suit your needs. For instance, once the module is enabled, if you go to www.yoursite.com/admin/config/people/accounts you'll now see an option to only allow invited people to register. You can also make it so when you "invite" someone (or maybe a better word would be "authorize" in your case), it either sends them an email with a customizable message containing their unique registration URL, or you can simply have it generate the registration URL and send it out later.

Another option would be to try the User restrictions module, which basically brings back the option to block/allow certain usernames and/or email addresses. Once enabled, if you go to www.yoursite.com/admin/config/people/user-restrictions/add you could then set a "Denied" rule for all email addresses (enter % into the Mask box), and afterwards add each new "Allowed" rule as needed. Examples:





I know it's not exactly what you had set up originally, but hopefully it can point you in a better direction. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.