From 45e42c25de5e498197a9aace7161b4f377a8dacc Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 14 Mar 2014 13:51:17 +0100 Subject: Group Database backend must not gather user details itself but ask user backends. This is a port to master from PR #7745 remove OC_GROUP_BACKEND_GET_DISPLAYNAME option for group backends Conflicts: lib/private/group/backend.php LDAP: getDisplayNamesInGroup is not an option for group backends anymore Conflicts: apps/user_ldap/group_ldap.php apps/user_ldap/group_proxy.php clean up group backends Conflicts: lib/private/group/database.php remove now unnecessary test implement getDisplayNames in group manager adjust user manager tests test for group manager's displayNamesInGroup trim must not be used in empty in PHP < 5.5 keep the constant to not provoke PHP warnings Conflicts: lib/private/group/backend.php --- lib/private/group/backend.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'lib/private/group/backend.php') diff --git a/lib/private/group/backend.php b/lib/private/group/backend.php index b0ed0d90d76..cc61fce1615 100644 --- a/lib/private/group/backend.php +++ b/lib/private/group/backend.php @@ -33,7 +33,7 @@ define('OC_GROUP_BACKEND_CREATE_GROUP', 0x00000001); define('OC_GROUP_BACKEND_DELETE_GROUP', 0x00000010); define('OC_GROUP_BACKEND_ADD_TO_GROUP', 0x00000100); define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP', 0x00001000); -define('OC_GROUP_BACKEND_GET_DISPLAYNAME', 0x00010000); +define('OC_GROUP_BACKEND_GET_DISPLAYNAME', 0x00010000); //OBSOLETE define('OC_GROUP_BACKEND_COUNT_USERS', 0x00100000); /** @@ -45,7 +45,6 @@ abstract class OC_Group_Backend implements OC_Group_Interface { OC_GROUP_BACKEND_DELETE_GROUP => 'deleteGroup', OC_GROUP_BACKEND_ADD_TO_GROUP => 'addToGroup', OC_GROUP_BACKEND_REMOVE_FROM_GOUP => 'removeFromGroup', - OC_GROUP_BACKEND_GET_DISPLAYNAME => 'displayNamesInGroup', OC_GROUP_BACKEND_COUNT_USERS => 'countUsersInGroup', ); @@ -137,23 +136,4 @@ abstract class OC_Group_Backend implements OC_Group_Interface { public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) { return array(); } - - /** - * @brief get a list of all display names in a group - * @param string $gid - * @param string $search - * @param int $limit - * @param int $offset - * @return array with display names (value) and user ids (key) - */ - public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) { - $displayNames = array(); - $users = $this->usersInGroup($gid, $search, $limit, $offset); - foreach ($users as $user) { - $displayNames[$user] = $user; - } - - return $displayNames; - } - } -- cgit v1.2.3