You are here

function user_role_features_rebuild in Features 6

Same name and namespace in other branches
  1. 7.2 includes/features.user.inc \user_role_features_rebuild()
  2. 7 includes/features.user.inc \user_role_features_rebuild()

Implementation of hook_features_rebuild().

1 call to user_role_features_rebuild()
user_role_features_revert in includes/features.user.inc
Implementation of hook_features_revert().

File

includes/features.user.inc, line 212

Code

function user_role_features_rebuild($module) {
  if ($defaults = features_get_default('user_role', $module)) {
    $roles = _features_get_roles();
    foreach ($defaults as $role) {
      if (!isset($roles[$role['name']])) {
        drupal_write_record('role', $role);
      }
    }
  }
}