diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-03 22:06:09 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-04 21:55:25 +0300 |
commit | c60c76d03b6b3e1069d229743c15990a7296ae10 (patch) | |
tree | dcfedf987e3b3421cbee99c04715a88c2a8c8bba /settings | |
parent | 6d1e2dc8c01da22d3b5e11ea7f8412feb7333fe7 (diff) | |
download | nextcloud-server-c60c76d03b6b3e1069d229743c15990a7296ae10.tar.gz nextcloud-server-c60c76d03b6b3e1069d229743c15990a7296ae10.zip |
Do not add groups if user has no groups
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 0f90283667a..6e994c652d9 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -448,8 +448,10 @@ $(document).ready(function () { OC.dialogs.alert(result.data.message, t('settings', 'Error creating user')); } else { - var addedGroups = result.data.groups.split(', '); - UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups)); + if (result.data.groups) { + var addedGroups = result.data.groups.split(', '); + UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups)); + } if($('tr[data-uid="' + username + '"]').length === 0) { UserList.add(username, username, result.data.groups, null, 'default', true); } |