You are here

function role_expire_rules_action_set_role_expire in Role Expire 7

Same name and namespace in other branches
  1. 6 role_expire.rules.inc \role_expire_rules_action_set_role_expire()

Action: Add expire time to role.

File

./role_expire.rules.inc, line 120
Rules integration for the role expire module.

Code

function role_expire_rules_action_set_role_expire($account, $rid, $timestamp) {
  if (!empty($account->uid)) {
    role_expire_write_record($account->uid, $rid, $timestamp);
  }
  else {
    watchdog('role_expire', t('Unable to set role expiration for anonymous user.'));
  }
}