Update user_imports.php
This commit is contained in:
parent
69d5edb66e
commit
f84309d816
|
|
@ -306,8 +306,10 @@
|
|||
}
|
||||
|
||||
if ($field_name == "group_name") {
|
||||
$group_name = '';
|
||||
foreach ($groups as $field) {
|
||||
if ($field['group_name'] == $result[$key]) {
|
||||
$group_name = $field['group_name'];
|
||||
$array['group_users'][$row_id]['group_user_uuid'] = uuid();
|
||||
$array['group_users'][$row_id]['domain_uuid'] = $domain_uuid;
|
||||
$array['group_users'][$row_id]['group_name'] = $field['group_name'];
|
||||
|
|
@ -315,6 +317,13 @@
|
|||
$array['group_users'][$row_id]['user_uuid'] = $user_uuid;
|
||||
}
|
||||
}
|
||||
|
||||
//remove superadmin if not the correct permission
|
||||
if ($group_name == 'superadmin') {
|
||||
if (!permission_exists('group_domain')) {
|
||||
unset($array['group_users'][$row_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue