I am granting users specific a role on purchase of some product( using ubercart). In doing so I have added a rule to take away their initial role(so that they do not have 2 roles and confuse the content access permissions). When the role expires, I want to grant the use back his original role. I am trying to use rules to do this. However, I am unsure on what action to call this rule. Any suggestions? Thanks!

3 Answers 3


It seems that "I am unsure on what action to call this rule" is your remaining issue, and that by using the rules module you are already close.

However, when talking about Rules and its Event-Condition-Action concept, your issue is about what Event to use. With that in mind, I would try to use the Rules Scheduler submodule of Rules, to schedule the rule to be executed at the moment of the purchase already.

Makes sense?


You can do this with using Ubercart Roles.

In Ubercart Role there is an option to send the notification to that user whose role is expired. You can trigger a rule on that event or you can define a role expiration event if you wish to tie it to a discrete event rather than the sending of an email.

I have found a patch for Role Expire which creates a Rules event upon role expiration that you might use as a model.

First you need to create a rule, then a simple action to assign a role (Add user role action) to the expiration:user.

  • Thanks! Yeah I did it almost exactly like that, however I wanted the event to be triggered exactly when the role expires - whereas now it is triggered "x" days before the expiry and only when the notification is sent to user(in case of the email expiry trigger). Commented Jun 23, 2015 at 7:06
  • Also, I am not using the Role Expire module but the built in expiry system that comes within UberCart. Commented Jun 23, 2015 at 7:09

This problem is you can handled by drupal rules.

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.