4

I am creating a website for a society, where members pay an annual fee. When members pay for the first time (through ubercart and 2checkout), they automatically receive a user role that enables them to create a member profile. I have set the membership to end a year after they have paid. I have also set up an e-mail reminder to be sent to the member, a week before, reminding them to renew their membership.

I've been playing with rules and relationships in views, unsuccessfully, to answer the following two questions, so I hope someone here has advice.

  • How do I automatically render the member profile invisible to other members once the payment due date has passed?
  • Is it possible to automatically render the same invisible profile visible should they renew their membership by paying and if so, how?
1

How do I automatically render the member profile invisible to other members once the payment due date has passed?

By blocking the user you can stop access on expired user.

Is it possible to automatically render the same invisible profile visible should they renew their membership by paying and if so, how?

For making it automatic so that a user can activate its account himself, you have to write a custom interface for that. (e.g. A block user tries to login, redirect to a page for user to enter his email address, then process his/her payment against his identity and unblock user)

$user = user_load('mail'=>$email);
user_save($user, array('status' => 1));
| improve this answer | |
1

I suggest you take a look at the Ubercart Recurring Payments and Subscriptions module; it sounds like you are homebrewing what they've already got working and a community of users battle-testing the logic: http://drupal.org/project/uc_recurring

| 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.