drupal roles on expiry

Discussion in 'Integration' started by smithmilner, Jun 2, 2010.

  1. smithmilner

    smithmilner New Member

    Joined:
    Jun 2, 2010
    Messages:
    6
    I'm new to aMember and need a little bit of help.

    When a user's subscribed role expires aMember either blocks their account or sets their role to authenticated user. I need aMember to set the role to a different role, namely "open member" which is the unpaid membership role for my website. Is this possible?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Possible but will require little modifications in plugin.
  3. smithmilner

    smithmilner New Member

    Joined:
    Jun 2, 2010
    Messages:
    6
    Ok, well how do I go about getting these modifications done? I have some experience with PHP maybe you could point me in the right direction.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You need to modify update_membership function in drupal.inc.php add this to the end of function:
    PHP:
    if(!$nuke_access){
    $this->query("INSERT INTO [db]users_roles
    (rid, uid)
    VALUES
    (10, 
    $n_user_id)");
    }
    where 10 is default role id

Share This Page