Better place to check for user removal

This commit is contained in:
Bart Visscher 2012-11-15 18:10:40 +01:00
parent 343e9d8621
commit 9419913c06

View file

@ -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;