summaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-11-15 18:10:40 +0100
committerBart Visscher <bartv@thisnet.nl>2012-11-15 18:10:40 +0100
commit9419913c06bc0fc7795243d9a9f8800f5e2a7ac4 (patch)
treeb238aa3028fb566045f3075086b24ef97248d950 /lib/user.php
parent343e9d86213edb832455338816527e9cbab0d6e0 (diff)
downloadnextcloud-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.php5
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;