summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-01-30 19:24:24 +0100
committerRobin Appelman <icewind@owncloud.com>2013-01-30 19:24:24 +0100
commit207aa22d12931d161f682198996086e74c91bf53 (patch)
tree26f65a42462244fdfc14e15c7788da8b7f8a524e /lib/public
parent95352fbc1568e0c49be25461a07d53b3d5ad3b45 (diff)
parent2fbf3d40900d29c04b69f0c18e4d833a312fb21c (diff)
downloadnextcloud-server-207aa22d12931d161f682198996086e74c91bf53.tar.gz
nextcloud-server-207aa22d12931d161f682198996086e74c91bf53.zip
merge master into filesystem
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php9
-rw-r--r--lib/public/user.php20
2 files changed, 28 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index f65d272ff17..3c5c2d53782 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -758,6 +758,15 @@ class Share {
continue;
}
}
+
+ // Add display names to result
+ if ( isset($row['share_with']) && $row['share_with'] != '') {
+ $row['share_with_displayname'] = \OCP\User::getDisplayName($row['share_with']);
+ }
+ if ( isset($row['uid_owner']) && $row['uid_owner'] != '') {
+ $row['displayname_owner'] = \OCP\User::getDisplayName($row['uid_owner']);
+ }
+
$items[$row['id']] = $row;
}
if (!empty($items)) {
diff --git a/lib/public/user.php b/lib/public/user.php
index 204d8e4c0f1..de52055a4c5 100644
--- a/lib/public/user.php
+++ b/lib/public/user.php
@@ -51,7 +51,25 @@ class User {
public static function getUsers($search = '', $limit = null, $offset = null) {
return \OC_USER::getUsers();
}
-
+
+ /**
+ * @brief get the user display name of the user currently logged in.
+ * @return string display name
+ */
+ public static function getDisplayName($user=null) {
+ return \OC_USER::getDisplayName($user);
+ }
+
+ /**
+ * @brief Get a list of all display names
+ * @returns array with all display names (value) and the correspondig uids (key)
+ *
+ * Get a list of all display names and user ids.
+ */
+ public static function getDisplayNames($search = '', $limit = null, $offset = null) {
+ return \OC_USER::getDisplayNames($search, $limit, $offset);
+ }
+
/**
* @brief Check if the user is logged in
* @returns true/false