Infinite loop on CLI initiated profile deletion for local users

profile deleting user deleting profile deleting user...
This commit is contained in:
Mikael Nordfeldth
2015-07-18 02:16:52 +02:00
parent 9fdf6474f8
commit 6f62adedfc
3 changed files with 16 additions and 4 deletions

View File

@@ -598,8 +598,10 @@ class User extends Managed_DataObject
}
try {
$profile = $this->getProfile();
$profile->delete();
if (!$this->hasRole(Profile_role::DELETED)) {
$profile = $this->getProfile();
$profile->delete();
}
} catch (UserNoProfileException $unp) {
common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion.");
}