protected function BulkUserImport::getAllowedRoles in Bulk User Registration 8
The roles allowed to import.
Return value
array An associative array with the role id as the key and the role name as value.
1 call to BulkUserImport::getAllowedRoles()
- BulkUserImport::buildForm in src/
Form/ BulkUserImport.php - Form constructor.
File
- src/
Form/ BulkUserImport.php, line 268
Class
- BulkUserImport
- Bulk user import form.
Namespace
Drupal\bulk_user_registration\FormCode
protected function getAllowedRoles() {
$allowedRoles = \Drupal::config('bulk_user_registration.settings')
->get('allowed_roles');
return array_intersect_key(user_role_names(TRUE), array_flip(array_filter($allowedRoles)));
}