summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-07-14 16:56:17 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-07-14 16:57:16 -0400
commitb455149bae9d764e36f2f61bfdea58f7c8d1f040 (patch)
tree7ae012c95d0f5086616019250f70b3dfc533bbae /settings/js
parent140263003afd35360a734fab7b32ca7b0dcbb3a0 (diff)
downloadnextcloud-server-b455149bae9d764e36f2f61bfdea58f7c8d1f040.tar.gz
nextcloud-server-b455149bae9d764e36f2f61bfdea58f7c8d1f040.zip
Fix undo delete user
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users.js33
1 files changed, 16 insertions, 17 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index 771ed51f5fb..63ad426ecf4 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -47,25 +47,24 @@ UserList={
if( !UserList.deleteCanceled && UserList.deleteUid ){
// Delete user via ajax
- $.post(
- OC.filePath('settings','ajax','removeuser.php'),
- {username:UserList.deleteUid},
- function(result){
-
- // Remove undo option, & remove user from table
- boolOperationFinished(
- data, function(){
- $('#notification').fadeOut();
- $('tr').filterAttr( 'data-uid', username ).remove();
- UserList.deleteCanceled=true;
- UserList.deleteFiles=null;
- if( ready ){
- ready();
- }
+ $.ajax({
+ type: 'POST',
+ url: OC.filePath('settings', 'ajax', 'removeuser.php'),
+ async: false,
+ data: { username: UserList.deleteUid },
+ success: function(result) {
+ if (result.status == 'success') {
+ // Remove undo option, & remove user from table
+ $('#notification').fadeOut();
+ $('tr').filterAttr('data-uid', UserList.deleteUid).remove();
+ UserList.deleteCanceled = true;
+ UserList.deleteFiles = null;
+ if (ready) {
+ ready();
}
- );
+ }
}
- );
+ });
}
}
}