diff options
Diffstat (limited to 'settings/js/users.js')
-rw-r--r-- | settings/js/users.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index bfc00138e0e..26e7ff24452 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -184,7 +184,13 @@ $(document).ready(function(){ select.data('username',username); select.data('userGroups',groups.join(', ')); tr.find('td.groups').empty(); - $.each($('#content table').data('groups').split(', '),function(i,group){ + var allGroups=$('#content table').data('groups').split(', '); + for(var i=0;i<groups.length;i++){ + if(allGroups.indexOf(groups[i])==-1){ + allGroups.push(groups[i]); + } + } + $.each(allGroups,function(i,group){ select.append($('<option value="'+group+'">'+group+'</option>')); }); tr.find('td.groups').append(select); |