0

Someone created a module for this called uc_clear roles so you can stop what's happening to me now which is when a new role is purchased it is just added to the old one. But this module is only for Drupal 6 and I am using 7.

Logintoboggan preauthorize role if the user neglects to verify it and then buys a role, the new role will replace it but if verified and user makes purchase for upgrade they end up with both free membership status as well as paid. I don't yet know how to write php or create a module but, could the RULES module do the job?

1

Yes, you can use Rules to manage roles.

Rules need Event to react on, Condition to evaluate for truth, Action to perform.

Event: It is hard to tell from from your post what would be your Event. I don't use Ubercart, but I assume it provides some Rules Events like Commerce, e.g. 'After adding a product to the cart,' 'On checkout coompletion,' and so on. There's also 'Before saving a user account,' 'After saving a user account' and so on.

Condition: "User has role(s)"

Action: "Add user role", "Remove user role"

Very simple actually.

[ Note also that the current version of Rules (2.8) is BROKEN with Commerce 2 ... not sure if the problem also exists with Ubercart ... users of Commerce have to downgrade Rules to 2.7 ]

  • in ubercart the event would be "Customer completes checkout" to occur after final payment is received, etc – Geoff Jan 31 '15 at 13:54
  • Thanks , that sounds simple enough. I am already using rules for redirect on log out so am sure can give it a go. – cea Feb 1 '15 at 0:36

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.