You are here

function role_expire_delete_record in Role Expire 7

Same name and namespace in other branches
  1. 6 role_expire.module \role_expire_delete_record()

API function; Delete a record from the database.

Parameters

$uid: User ID.

$rid: Role ID.

3 calls to role_expire_delete_record()
role_expire_cron in ./role_expire.module
Implements hook_cron().
role_expire_rules_action_remove_role_expire in ./role_expire.rules.inc
Action: Remove expire time from role
role_expire_user_update in ./role_expire.module
Implements hook_user_update().

File

./role_expire.module, line 54
Role Expire module

Code

function role_expire_delete_record($uid, $rid) {
  db_delete('role_expire')
    ->condition('uid', $uid)
    ->condition('rid', $rid)
    ->execute();

  // Delete the user's sessions so they have login again with their new access.
  drupal_session_destroy_uid($uid);
}