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-03 22:06:09 +0300 |
commit | a20f7f1d6769881c06ccd9d49d14a1a524699353 (patch) | |
tree | 4d8491de5cd178ee9e24058336f6e5fdfbcf15f8 /settings/js | |
parent | 33e1ced53c31443ad9918d6bdd7d20afc628ccbd (diff) | |
download | nextcloud-server-a20f7f1d6769881c06ccd9d49d14a1a524699353.tar.gz nextcloud-server-a20f7f1d6769881c06ccd9d49d14a1a524699353.zip |
Do not add groups if user has no groups
Diffstat (limited to 'settings/js')
-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 7ed6c50d588..9fe593214f2 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -449,8 +449,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); } |