summaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-25 13:00:17 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-25 13:00:17 +0100
commitb4291f1e8e2326f5f1cbd97fa130d547f949b62d (patch)
tree49115d1ea0c90119213b4231f5183004b8c6dab1 /lib/user.php
parent64e853394c120888a7555901a52c5868f33aef3c (diff)
downloadnextcloud-server-b4291f1e8e2326f5f1cbd97fa130d547f949b62d.tar.gz
nextcloud-server-b4291f1e8e2326f5f1cbd97fa130d547f949b62d.zip
allow to get the display name from an abitrary user
Diffstat (limited to 'lib/user.php')
-rw-r--r--lib/user.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/user.php b/lib/user.php
index 4cdf07dc3ff..65f899aa27c 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -350,8 +350,10 @@ class OC_User {
* @brief get the display name of the user currently logged in.
* @return string uid or false
*/
- public static function getDisplayName() {
- if( isset($_SESSION['display_name']) AND $_SESSION['display_name'] ) {
+ public static function getDisplayName($user=null) {
+ if ( $user ) {
+ return self::determineDisplayName($user);
+ } else if( isset($_SESSION['display_name']) AND $_SESSION['display_name'] ) {
return $_SESSION['display_name'];
}
else{