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 546406f71..9b90ce61b 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -721,16 +721,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();