diff options
author | Evan Prodromou <evan@status.net> | 2009-11-08 17:06:41 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-08 17:06:41 -0500 |
commit | 111f6a775daf9334adb05c9f8e539d682238f4dd (patch) | |
tree | ce98d1968560538272e53a79ef4551b194eb1ab8 /classes | |
parent | b7e2e3fd2b7e36f75c810a599334c2ca8abcca55 (diff) | |
parent | da444f8a15043f326aa9a629ba5f0b25bc35b1e5 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 6 |
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(); |