1

I work on a Drupal site with the Organic groups module, where users can create account.

When the process for creating an account is finished, users have access to a specific group and should have og role Trial member (automatically assigned) with state Active, and this for a limited time period.

After that limited time period is passed, user still has og role Trial member assigned, but with state Pending.

Can someone help me with this?

1

Sounds like a perfect job to accomplish with the Rules module. Below are the headlines of how you could get this to work ...

Rule 1 (When user account is created)

  • Event: When a new user account is created
  • Action:
    1. Grant access to role Trial member.
    2. Set some Date field value = expiration date (cfr. your "limited time").
    3. Set some State field value = Active.

Rule 2 (When expired)

  • Event: When user logs in
  • Condition: if the date indicated in field with expiration date is passed.
  • Action: Set your State field value = Pending.

Recommended video tutorials

Rules

If you're not familiar (enough/yet) with Rules, checkout the 32 (!!!) great, and free, video tutorials Learn the Rules framework.

Organic Groups

If you're not familiar (enough/yet) with Organic Groups, then reviewing the amazing set of videos to Learn Organic Groups might help.

Other variations

There are other variations to make this work with the Rules module. E.g. by using 'Rules Scheduler' (= sub-module of Rules) to schedule a variation of "Rule 2", to be executed on your expiration date.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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