function user_expire_get_role_rules in User Expire 8
Same name and namespace in other branches
- 7 user_expire.module \user_expire_get_role_rules()
Gets the role inactivity rules.
Return value
mixed An array of objects keyed by rid of rid and inactivity_period or FALSE.
2 calls to user_expire_get_role_rules()
- user_expire_expire_by_role in ./
user_expire.module - Expires user by roles according to rules in the database.
- user_expire_expire_by_role_warning in ./
user_expire.module - Warns users with an upcoming expiration by roles.
File
- ./
user_expire.module, line 437 - Main module file for User expire module.
Code
function user_expire_get_role_rules() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->get('user_expire.settings');
return $config
->get('user_expire_roles') ?: [];
}