Automatically turning a profile to unpublished if membership is unpaid and v.v 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?
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'=&gt;$email);
user_save($user, array('status' =&gt; 1));