summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-29 15:14:25 -0700
committerBrion Vibber <brion@pobox.com>2010-03-29 15:14:25 -0700
commit873b8328272ae9cb189477fd10e75b16d5ce050e (patch)
tree89979da777a4d2158321f56a69409882d6e96321 /classes
parenta8d92dad5e4b82dd5a4f0ca7ed52f37256b60cd2 (diff)
parentbf468e2a8db4d67a0f1a2c7fdfd0aa9306e006fc (diff)
Merge branch 'master' into testing
Conflicts: plugins/Blacklist/BlacklistPlugin.php
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) {