Allow to sort groups by name
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
231cffffb9
commit
48bdb1bec1
|
@ -942,6 +942,11 @@ $CONFIG = array(
|
||||||
*/
|
*/
|
||||||
'ldapUserCleanupInterval' => 51,
|
'ldapUserCleanupInterval' => 51,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort groups in the user settings by name instead of the user count
|
||||||
|
*/
|
||||||
|
'sort_groups_by_name' => false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Comments
|
* Comments
|
||||||
*
|
*
|
||||||
|
|
|
@ -45,6 +45,11 @@ $groupManager = \OC::$server->getGroupManager();
|
||||||
// Set the sort option: SORT_USERCOUNT or SORT_GROUPNAME
|
// Set the sort option: SORT_USERCOUNT or SORT_GROUPNAME
|
||||||
$sortGroupsBy = \OC\Group\MetaData::SORT_USERCOUNT;
|
$sortGroupsBy = \OC\Group\MetaData::SORT_USERCOUNT;
|
||||||
|
|
||||||
|
$config = \OC::$server->getConfig();
|
||||||
|
|
||||||
|
if ($config->getSystemValue('sort_groups_by_name', false)) {
|
||||||
|
$sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME;
|
||||||
|
} else {
|
||||||
$isLDAPUsed = false;
|
$isLDAPUsed = false;
|
||||||
if (\OC_App::isEnabled('user_ldap')) {
|
if (\OC_App::isEnabled('user_ldap')) {
|
||||||
$isLDAPUsed =
|
$isLDAPUsed =
|
||||||
|
@ -55,8 +60,7 @@ if (\OC_App::isEnabled('user_ldap')) {
|
||||||
$sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME;
|
$sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$config = \OC::$server->getConfig();
|
|
||||||
|
|
||||||
$isAdmin = OC_User::isAdminUser(OC_User::getUser());
|
$isAdmin = OC_User::isAdminUser(OC_User::getUser());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue