summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-08 17:06:41 -0500
committerEvan Prodromou <evan@status.net>2009-11-08 17:06:41 -0500
commit111f6a775daf9334adb05c9f8e539d682238f4dd (patch)
treece98d1968560538272e53a79ef4551b194eb1ab8 /classes/User.php
parentb7e2e3fd2b7e36f75c810a599334c2ca8abcca55 (diff)
parentda444f8a15043f326aa9a629ba5f0b25bc35b1e5 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
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();