summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-04 11:12:34 -0800
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-04 11:12:34 -0800
commitee00ddeb60b98b9a817bc93afea5bf9e410e612b (patch)
treed0bf46e06e6df117c25c289693033b29ee032454
parent8c64484c5e0d756629ada3e32d40ef450a02f9ff (diff)
parent8b09402b771fcede0cc5183340729b9c4be654e9 (diff)
downloadnextcloud-server-ee00ddeb60b98b9a817bc93afea5bf9e410e612b.tar.gz
nextcloud-server-ee00ddeb60b98b9a817bc93afea5bf9e410e612b.zip
Merge pull request #2084 from owncloud/fix-group-displaynames
Fix #2074 by initializing as an array
-rw-r--r--lib/group/backend.php10
-rw-r--r--lib/group/database.php4
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/group/backend.php b/lib/group/backend.php
index e7b7b21d957..26a784efb28 100644
--- a/lib/group/backend.php
+++ b/lib/group/backend.php
@@ -142,14 +142,14 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
* @param int $offset
* @return array with display names (value) and user ids (key)
*/
- public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
- $displayNames = '';
+ 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;
+ foreach ($users as $user) {
+ $displayNames[$user] = $user;
}
- return $DisplayNames;
+ return $displayNames;
}
}
diff --git a/lib/group/database.php b/lib/group/database.php
index 40e9b0d4147..d0974685ff6 100644
--- a/lib/group/database.php
+++ b/lib/group/database.php
@@ -219,8 +219,8 @@ class OC_Group_Database extends OC_Group_Backend {
* @param int $offset
* @return array with display names (value) and user ids (key)
*/
- public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
- $displayNames = '';
+ public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
+ $displayNames = array();
$stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`'
.' FROM `*PREFIX*users`'