Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit c4f9635

Browse files
committed
Fix performances issues for list_authorized_users
1 parent cd24cfc commit c4f9635

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/src/plugins/core.conf/class.AbstractConfDriver.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,18 +1102,15 @@ public function switchAction($action, $httpVars, $fileVars)
11021102
// donothing
11031103
break;
11041104
case 'group':
1105-
$allUsers = AuthService::listUsers($baseGroup, $regexp, 0, $limit, false);
11061105
$authGroups = AuthService::listChildrenGroups($baseGroup);
11071106
foreach ($authGroups as $gId => $gName) {
11081107
$allGroups["AJXP_GRP_" . AuthService::filterBaseGroup($gId)] = $gName;
11091108
}
11101109
break;
11111110
case 'role':
1112-
$allUsers = AuthService::listUsers($baseGroup, $regexp, 0, $limit, false);
11131111
$allGroups = $this->getUserRoleList($loggedUser, $rolePrefix, $includeString, $excludeString, $listRoleType);
11141112
break;
11151113
case 'rolegroup';
1116-
$allUsers = AuthService::listUsers($baseGroup, $regexp, 0, $limit, false);
11171114
$groups = array();
11181115
$authGroups = AuthService::listChildrenGroups($baseGroup);
11191116
foreach ($authGroups as $gId => $gName) {
@@ -1273,9 +1270,9 @@ public function getUserRoleList($userObject, $rolePrefix, $includeString, $exclu
12731270
{
12741271
if ($userObject) {
12751272
if ($byUserRoles) {
1276-
$allUserRoles = $userObject->getRoles();
1273+
$allUserRoles = $userObject->getRoles();
12771274
} else {
1278-
$allUserRoles = AuthService::getRolesList();
1275+
$allUserRoles = AuthService::getRolesList(array(), true);
12791276
}
12801277
$allRoles = array();
12811278
if (isset($allUserRoles)) {

0 commit comments

Comments
 (0)