From 9419913c06bc0fc7795243d9a9f8800f5e2a7ac4 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 15 Nov 2012 18:10:40 +0100 Subject: [PATCH] Better place to check for user removal --- lib/user.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/user.php b/lib/user.php index a60ebbe442..31c93740d7 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;