summaryrefslogtreecommitdiffstats
path: root/lib/group
diff options
context:
space:
mode:
Diffstat (limited to 'lib/group')
-rw-r--r--lib/group/backend.php34
-rw-r--r--lib/group/database.php34
2 files changed, 34 insertions, 34 deletions
diff --git a/lib/group/backend.php b/lib/group/backend.php
index 4f6570c3be3..e7b7b21d957 100644
--- a/lib/group/backend.php
+++ b/lib/group/backend.php
@@ -133,23 +133,23 @@ 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 = '';
- $users = $this->usersInGroup($gid, $search, $limit, $offset);
- foreach ( $users as $user ) {
- $DisplayNames[$user] = $user;
- }
-
- return $DisplayNames;
+
+ /**
+ * @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 = '';
+ $users = $this->usersInGroup($gid, $search, $limit, $offset);
+ foreach ( $users as $user ) {
+ $DisplayNames[$user] = $user;
+ }
+
+ return $DisplayNames;
}
}
diff --git a/lib/group/database.php b/lib/group/database.php
index 8816dd8169c..40e9b0d4147 100644
--- a/lib/group/database.php
+++ b/lib/group/database.php
@@ -210,30 +210,30 @@ class OC_Group_Database extends OC_Group_Backend {
}
return $users;
}
-
- /**
- * @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) {
+
+ /**
+ * @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 = '';
$stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`'
.' FROM `*PREFIX*users`'
.' INNER JOIN `*PREFIX*group_user` ON `*PREFIX*group_user`.`uid` = `*PREFIX*users`.`uid`'
- .' WHERE `gid` = ? AND `*PREFIX*group_user.uid` LIKE ?',
+ .' WHERE `gid` = ? AND `*PREFIX*group_user`.`uid` LIKE ?',
$limit,
$offset);
- $result = $stmt->execute(array($gid, $search.'%'));
- $users = array();
+ $result = $stmt->execute(array($gid, $search.'%'));
+ $users = array();
while ($row = $result->fetchRow()) {
- $displayName = trim($row['displayname'], ' ');
- $displayNames[$row['uid']] = empty($displayName) ? $row['uid'] : $displayName;
- }
- return $displayNames;
+ $displayName = trim($row['displayname'], ' ');
+ $displayNames[$row['uid']] = empty($displayName) ? $row['uid'] : $displayName;
+ }
+ return $displayNames;
}
}