diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-11-15 18:10:40 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-11-15 18:10:40 +0100 |
commit | 9419913c06bc0fc7795243d9a9f8800f5e2a7ac4 (patch) | |
tree | b238aa3028fb566045f3075086b24ef97248d950 /lib/user.php | |
parent | 343e9d86213edb832455338816527e9cbab0d6e0 (diff) | |
download | nextcloud-server-9419913c06bc0fc7795243d9a9f8800f5e2a7ac4.tar.gz nextcloud-server-9419913c06bc0fc7795243d9a9f8800f5e2a7ac4.zip |
Better place to check for user removal
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/user.php b/lib/user.php index a60ebbe4423..31c93740d77 100644 --- a/lib/user.php +++ b/lib/user.php @@ -204,6 +204,9 @@ class OC_User { foreach(self::$_usedBackends as $backend) { $backend->deleteUser($uid); } + if (self::userExists($uid)) { + return false; + } // We have to delete the user from all groups foreach( OC_Group::getUserGroups( $uid ) as $i ) { OC_Group::removeFromGroup( $uid, $i ); @@ -216,7 +219,7 @@ class OC_User { // Emit and exit OC_Hook::emit( "OC_User", "post_deleteUser", array( "uid" => $uid )); - return !self::userExists($uid); + return true; } else{ return false; |