summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-02-22 14:51:21 +0100
committerThomas Tanghus <thomas@tanghus.net>2013-02-22 14:51:21 +0100
commit2268596e1a3cb305bc3092394e59d5fdc72f0c1b (patch)
tree3db94e68d6c7669bcf8d46bf233330cc46ecbddf /settings/js
parentc0443a2f0da13a6f3c10690887fb1b44a95f7106 (diff)
downloadnextcloud-server-2268596e1a3cb305bc3092394e59d5fdc72f0c1b.tar.gz
nextcloud-server-2268596e1a3cb305bc3092394e59d5fdc72f0c1b.zip
Fetch displayname in userlist ajax requests. Refs #1681
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index 63a62049839..452bdf5f838 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -66,10 +66,10 @@ var UserList = {
}
},
- add: function (username, groups, subadmin, quota, sort) {
+ add: function (username, displayname, groups, subadmin, quota, sort) {
var tr = $('tbody tr').first().clone();
tr.attr('data-uid', username);
- tr.attr('data-displayName', username);
+ tr.attr('data-displayName', displayname);
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);
@@ -138,7 +138,7 @@ var UserList = {
$.get(OC.Router.generate('settings_ajax_userlist', { offset: UserList.offset }), function (result) {
if (result.status === 'success') {
$.each(result.data, function (index, user) {
- var tr = UserList.add(user.name, user.groups, user.subadmin, user.quota, false);
+ var tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, false);
UserList.offset++;
if (index == 9) {
$(tr).bind('inview', function (event, isInView, visiblePartX, visiblePartY) {
@@ -373,7 +373,7 @@ $(document).ready(function () {
OC.dialogs.alert(result.data.message,
t('settings', 'Error creating user'));
} else {
- UserList.add(username, result.data.groups, null, 'default', true);
+ UserList.add(username, username, result.data.groups, null, 'default', true);
}
}
);