summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-28 11:58:16 -0400
committerEvan Prodromou <evan@status.net>2010-03-28 11:58:16 -0400
commit65766a0ebed68b3bf15dc0c14fa4f051e460b9a7 (patch)
tree315e9a0a22acaa9c8f9c756b1afe524f48f058c0 /classes
parentddc71b6637573831ee9e9799e4e48ca2e90d5203 (diff)
continue deleting even if user profile record is missing
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/classes/User.php b/classes/User.php
index 8ad2ec63d..659ec9467 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -670,8 +670,12 @@ class User extends Memcached_DataObject
function delete()
{
- $profile = $this->getProfile();
- $profile->delete();
+ try {
+ $profile = $this->getProfile();
+ $profile->delete();
+ } catch (UserNoProfileException $unp) {
+ common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion.");
+ }
$related = array('Fave',
'Confirm_address',
@@ -679,6 +683,7 @@ class User extends Memcached_DataObject
'Foreign_link',
'Invitation',
);
+
Event::handle('UserDeleteRelated', array($this, &$related));
foreach ($related as $cls) {