diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-16 11:31:04 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-16 11:31:04 +0200 |
commit | 497fe93b6c0a7de212e69ec8a343867cb4904dca (patch) | |
tree | 07a4f08a520ee95bc69f3311cef90342195d36d9 /settings | |
parent | 171f86ca2e71918809930e823062d93c03833921 (diff) | |
download | nextcloud-server-497fe93b6c0a7de212e69ec8a343867cb4904dca.tar.gz nextcloud-server-497fe93b6c0a7de212e69ec8a343867cb4904dca.zip |
Do not return backends but add a method to check for one
Diffstat (limited to 'settings')
-rw-r--r-- | settings/users.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/settings/users.php b/settings/users.php index 5da6902b8fa..c438e5fbfd0 100644 --- a/settings/users.php +++ b/settings/users.php @@ -41,12 +41,10 @@ $groupManager = \OC_Group::getManager(); $sortGroupsBy = \OC\Group\MetaData::SORT_USERCOUNT; if (class_exists('\OCA\user_ldap\GROUP_LDAP')) { - $backends = $groupManager->getBackends(); - foreach ($backends as $backend) { - if ($backend instanceof \OCA\user_ldap\GROUP_LDAP) { - // LDAP user count can be slow, so we sort by gorup name here - $sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME; - } + $isLDAPUsed = $groupManager->isBackendUsed('\OCA\user_ldap\GROUP_LDAP'); + if ($isLDAPUsed) { + // LDAP user count can be slow, so we sort by group name here + $sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME; } } |