diff options
author | Raghu Nayyar <me@iraghu.com> | 2013-07-04 11:50:19 -0700 |
---|---|---|
committer | Raghu Nayyar <me@iraghu.com> | 2013-07-04 11:50:19 -0700 |
commit | b2afbe0e8b914d2e5807138953c8a0a6e2c8f4ac (patch) | |
tree | 758ff8ef3111231975cf90dd4de3d234658a421c /settings | |
parent | 47058b19043b8e8bb5e196e1e30e14cf9e9e2989 (diff) | |
parent | a20f7f1d6769881c06ccd9d49d14a1a524699353 (diff) | |
download | nextcloud-server-b2afbe0e8b914d2e5807138953c8a0a6e2c8f4ac.tar.gz nextcloud-server-b2afbe0e8b914d2e5807138953c8a0a6e2c8f4ac.zip |
Merge pull request #3927 from owncloud/Fix_new_user_empty_group
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 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); } |