aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRaghu Nayyar <me@iraghu.com>2013-07-04 11:50:19 -0700
committerRaghu Nayyar <me@iraghu.com>2013-07-04 11:50:19 -0700
commitb2afbe0e8b914d2e5807138953c8a0a6e2c8f4ac (patch)
tree758ff8ef3111231975cf90dd4de3d234658a421c /settings
parent47058b19043b8e8bb5e196e1e30e14cf9e9e2989 (diff)
parenta20f7f1d6769881c06ccd9d49d14a1a524699353 (diff)
downloadnextcloud-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.js6
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);
}