You are here

function role_expire_get_default_duration in Role Expire 6

Same name and namespace in other branches
  1. 7 role_expire.module \role_expire_get_default_duration()

API function; Get all the default duration for a role.

Parameters

$rid: Required. The role_id to check.

Return value

Int storing the default duration days of the role or an empty string if not set.

2 calls to role_expire_get_default_duration()
role_expire_form_user_admin_role_alter in ./role_expire.module
Implementation of hook_form_FORM-ID_alter().
role_expire_process_default_role_duration_for_user in ./role_expire.module

File

./role_expire.module, line 104
Role Expire module

Code

function role_expire_get_default_duration($rid) {
  $result = db_result(db_query("SELECT duration FROM {role_expire_length} WHERE rid = %d", $rid));
  return $result ? $result : '';
}