Check if app is enabled instead of if class exists

This commit is contained in:
Robin McCorkell 2015-09-07 10:28:08 +01:00
parent 4c5afe85da
commit c97147c99a

View file

@ -41,7 +41,7 @@ $groupManager = \OC_Group::getManager();
// Set the sort option: SORT_USERCOUNT or SORT_GROUPNAME
$sortGroupsBy = \OC\Group\MetaData::SORT_USERCOUNT;
if (class_exists('\OCA\user_ldap\GROUP_LDAP')) {
if (\OC_App::isEnabled('user_ldap')) {
$isLDAPUsed =
$groupManager->isBackendUsed('\OCA\user_ldap\GROUP_LDAP')
|| $groupManager->isBackendUsed('\OCA\user_ldap\Group_Proxy');