allow to get the display name from an abitrary user
This commit is contained in:
parent
64e853394c
commit
b4291f1e8e
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue