Merge branch 'ent-6941-Problemas-de-rendimiento-en-la-vista-Manage-users' into 'develop'

Ent 6941 problemas de rendimiento en la vista manage users

See merge request artica/pandorafms!3799
This commit is contained in:
Daniel Rodriguez 2021-04-06 17:33:38 +00:00
commit 8ebaddc233
1 changed files with 10 additions and 6 deletions

View File

@ -440,19 +440,23 @@ if (!defined('METACONSOLE')) {
$table->valign[6] = 'top';
}
$group_um = users_get_groups_UM($config['id_user']);
$info1 = [];
$user_is_admin = users_is_admin();
// Is admin or has group permissions all.
if ($user_is_admin || isset($group_um[0])) {
if ($user_is_admin) {
$info1 = get_users($order);
} else {
$group_um = users_get_groups_UM($config['id_user']);
// 0 is the group 'all'.
if (isset($group_um[0])) {
$info1 = get_users($order);
} else {
foreach ($group_um as $group => $value) {
$info1 = array_merge($info1, users_get_users_by_group($group, $value));
}
}
}
// Filter the users
if ($search) {