function administerusersbyrole_entity_create_access in Administer Users by Role 8.2
Same name and namespace in other branches
- 8.3 administerusersbyrole.module \administerusersbyrole_entity_create_access()
Implements hook_entity_create_access().
File
- ./
administerusersbyrole.module, line 85
Code
function administerusersbyrole_entity_create_access(AccountInterface $account, array $context, $entity_bundle) {
if ($context['entity_type_id'] != 'user') {
return AccessResult::neutral();
}
return AccessResult::allowedIfHasPermission($account, 'create users');
}