summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/user.php4
-rw-r--r--settings/js/users.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/user.php b/lib/user.php
index 3a35069fd62..6452f80602c 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -283,7 +283,9 @@ class OC_User {
$displayName = self::determineDisplayName($uid);
$result = true;
}
- $_SESSION['display_name'] = $displayName;
+ if (OC_User::getUser() === $uid) {
+ $_SESSION['display_name'] = $displayName;
+ }
return $result;
}
diff --git a/settings/js/users.js b/settings/js/users.js
index a50fac03727..524a57e0776 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -70,7 +70,9 @@ var UserList = {
add:function (username, groups, subadmin, quota, sort) {
var tr = $('tbody tr').first().clone();
tr.attr('data-uid', username);
+ tr.attr('data-displayName', username);
tr.find('td.name').text(username);
+ tr.find('td.displayName').text(username);
var groupsSelect = $('<select multiple="multiple" class="groupsselect" data-placehoder="Groups" title="' + t('settings', 'Groups') + '"></select>').attr('data-username', username).attr('data-user-groups', groups);
tr.find('td.groups').empty();
if (tr.find('td.subadmins').length > 0) {