summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/js/users.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index d79b21765ff..b92feb52334 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -218,9 +218,9 @@ var UserList = {
group: group
},
function (response) {
- if(response.status === 'success' && response.data.action === 'add') {
- if(UserList.availableGroups.indexOf(response.data.gropname) === -1) {
- UserList.availableGroups.push(response.data.gropname);
+ if(response.status === 'success') {
+ if(UserList.availableGroups.indexOf(response.data.groupname) === -1 && response.data.action === 'add') {
+ UserList.availableGroups.push(response.data.groupname);
}
} else {
OC.Notification.show(response.data.message);