Merge pull request #3927 from owncloud/Fix_new_user_empty_group
Do not add groups if user has no groups
This commit is contained in:
commit
b2afbe0e8b
|
@ -449,8 +449,10 @@ $(document).ready(function () {
|
||||||
OC.dialogs.alert(result.data.message,
|
OC.dialogs.alert(result.data.message,
|
||||||
t('settings', 'Error creating user'));
|
t('settings', 'Error creating user'));
|
||||||
} else {
|
} else {
|
||||||
var addedGroups = result.data.groups.split(', ');
|
if (result.data.groups) {
|
||||||
UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups));
|
var addedGroups = result.data.groups.split(', ');
|
||||||
|
UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups));
|
||||||
|
}
|
||||||
if($('tr[data-uid="' + username + '"]').length === 0) {
|
if($('tr[data-uid="' + username + '"]').length === 0) {
|
||||||
UserList.add(username, username, result.data.groups, null, 'default', true);
|
UserList.add(username, username, result.data.groups, null, 'default', true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue