From 2fee1208eff1911ffcdbba24ea1e8543ed6ec26b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= <schiessle@owncloud.com>
Date: Thu, 24 Jan 2013 15:49:23 +0100
Subject: [PATCH] add display name to title instead if login-ID

---
 core/templates/layout.user.php | 2 +-
 lib/user.php                   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index a16d2c9e55..fb63200123 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 	<head>
-		<title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?></title>
+		<title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getDisplayName()?' ('.OC_User::getDisplayName().') ':'' ?></title>
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 		<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
 		<?php foreach($_['cssfiles'] as $cssfile): ?>
diff --git a/lib/user.php b/lib/user.php
index d6d47293cb..f9c8f48568 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -351,7 +351,7 @@ class OC_User {
 	 * @return string uid or false
 	 */
 	public static function getDisplayName() {
-		if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] ) {
+		if( isset($_SESSION['display_name']) AND $_SESSION['display_name'] ) {
 			return $_SESSION['display_name'];
 		}
 		else{
-- 
GitLab