summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/User.php b/classes/User.php
index 96a64ccb2..b0d372be8 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -719,16 +719,18 @@ class User extends Memcached_DataObject
function delete()
{
$profile = $this->getProfile();
- $profile->delete();
+ if ($profile) {
+ $profile->delete();
+ }
$related = array('Fave',
- 'User_openid',
'Confirm_address',
'Remember_me',
'Foreign_link',
'Invitation',
'Notice_inbox',
);
+ Event::handle('UserDeleteRelated', array($this, &$related));
foreach ($related as $cls) {
$inst = new $cls();