]> source.dussan.org Git - nextcloud-server.git/commitdiff
Better check and handing of user deletion
authorBart Visscher <bartv@thisnet.nl>
Wed, 14 Nov 2012 20:45:03 +0000 (21:45 +0100)
committerBart Visscher <bartv@thisnet.nl>
Wed, 14 Nov 2012 20:52:28 +0000 (21:52 +0100)
lib/user.php
settings/js/users.js

index 872fff9b2d9dde02fd2a5775f82a892c6b354554..a60ebbe442388d410e3658c214dcf3accd60ee2e 100644 (file)
@@ -216,7 +216,7 @@ class OC_User {
 
                        // Emit and exit
                        OC_Hook::emit( "OC_User", "post_deleteUser", array( "uid" => $uid ));
-                       return true;
+                       return !self::userExists($uid);
                }
                else{
                        return false;
index 91be1a443851b8e06f69c96c1b449b41b6f49406..517984f92475b88e2a50932086dccc75d2c9f01d 100644 (file)
@@ -59,6 +59,8 @@ var UserList={
                                                if (ready) {
                                                        ready();
                                                }
+                                       } else {
+                                               oc.dialogs.alert(result.data.message, t('settings', 'Unable to remove user'));
                                        }
                                }
                        });