summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-07-18 21:10:19 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-07-18 21:10:19 +0200
commit1d39282360e956d93fbfb1c1c17c9bcf79292729 (patch)
treeedbf0df9a5720d40da971501d9d0ee128eb37ec4 /settings/js
parent038ba1d05dd51276760a22b249962d3fa96fd283 (diff)
downloadnextcloud-server-1d39282360e956d93fbfb1c1c17c9bcf79292729.tar.gz
nextcloud-server-1d39282360e956d93fbfb1c1c17c9bcf79292729.zip
$.unique works only for DOM elements
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users/users.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 9eb8f91ac7c..883851e2a2f 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -654,9 +654,11 @@ $(document).ready(function () {
} else {
if (result.data.groups) {
var addedGroups = result.data.groups;
- UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups));
for (var i in result.data.groups) {
var gid = result.data.groups[i];
+ if(UserList.availableGroups.indexOf(gid) === -1) {
+ UserList.availableGroups.push(gid);
+ }
$li = GroupList.getGroupLI(gid);
userCount = GroupList.getUserCount($li);
GroupList.setUserCount($li, userCount + 1);