summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/js/users.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index b45038e5b04..46ab12b857a 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -133,6 +133,7 @@ $(document).ready(function(){
}
var password=$('#newuserpassword').val();
var groups=$('#newusergroups').prev().children('div').data('settings').checked;
+ var tr
$.post(
OC.filePath('settings','ajax','createuser.php'),
{
@@ -141,10 +142,12 @@ $(document).ready(function(){
groups:groups,
},
function(result){
-
+ if(result.status!='success'){
+ tr.remove();
+ }
}
);
- var tr=$('#content table tbody tr').first().clone();
+ tr=$('#content table tbody tr').first().clone();
tr.attr('data-uid',username);
tr.find('td.name').text(username);
var select=$('<select multiple="multiple" data-placehoder="Groups" title="Groups">');