Skip to content
Snippets Groups Projects
Commit 9419913c authored by Bart Visscher's avatar Bart Visscher
Browse files

Better place to check for user removal

parent 343e9d86
Branches
No related tags found
No related merge requests found
...@@ -204,6 +204,9 @@ class OC_User { ...@@ -204,6 +204,9 @@ class OC_User {
foreach(self::$_usedBackends as $backend) { foreach(self::$_usedBackends as $backend) {
$backend->deleteUser($uid); $backend->deleteUser($uid);
} }
if (self::userExists($uid)) {
return false;
}
// We have to delete the user from all groups // We have to delete the user from all groups
foreach( OC_Group::getUserGroups( $uid ) as $i ) { foreach( OC_Group::getUserGroups( $uid ) as $i ) {
OC_Group::removeFromGroup( $uid, $i ); OC_Group::removeFromGroup( $uid, $i );
...@@ -216,7 +219,7 @@ class OC_User { ...@@ -216,7 +219,7 @@ class OC_User {
// Emit and exit // Emit and exit
OC_Hook::emit( "OC_User", "post_deleteUser", array( "uid" => $uid )); OC_Hook::emit( "OC_User", "post_deleteUser", array( "uid" => $uid ));
return !self::userExists($uid); return true;
} }
else{ else{
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment