Skip to content
Snippets Groups Projects
Commit b4291f1e authored by Björn Schießle's avatar Björn Schießle
Browse files

allow to get the display name from an abitrary user

parent 64e85339
Branches
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@ class User {
* @brief get the user display name of the user currently logged in.
* @return string display name
*/
public static function getDisplayName() {
return \OC_USER::getDisplayName();
public static function getDisplayName($user=null) {
return \OC_USER::getDisplayName($user);
}
/**
......
......@@ -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{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment