In Drupal, our website is set up so that people must validate their accounts when they sign up for one. Normally, they are not able to access the "subscribe" page (for specific training content that they pay for) until they have a validated account, but some people seem to be paying for a membership without validating their account first, which gives them all kinds of problems do to how content access is set up.

Is there a way to validate an account in Drupal at the same time that the member role is assigned to them?

Drupal 7.50 CiviCRM 4.7.15

1 Answer 1


Is your validation/invalidation a user role in Drupal?

In that case you can use the Drupal rules module to trigger a role change that checks for 'unvalidated user' when the 'member' role is added, and removes it if found (or the other way around depending on which way your validation works). If your validation triggers on anything that rules can be connected up with this should work, even if it's not a role.

One weird fringe case of data security I would consider with the process you described is if you handle any semi-sensitive to sensitive data and if validated users can access/change about themselves that may already be in your database. In that case anyone could get a validated account that hooks up to the contact data and access it by using an email that is not theirs, even if they don't have access to the email account, simply by paying for a membership.

  • It is a role type and we have civimember role sync module. It sounds like the security risk warrants a different approach to the problem. Thanks for the info!
    – Christia
    Feb 7, 2017 at 17:17
  • The rules module I was talking about can be found here: drupal.org/project/rules. You may also need some additional integration modules depending on your use. Documentation is available at that link as well. Feb 22, 2017 at 22:18

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.