diff options
author | Evan Prodromou <evan@status.net> | 2009-11-08 21:23:09 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-08 21:23:09 -0500 |
commit | 76b0e6e6f4151235d5032d1aa90f0937b415bd87 (patch) | |
tree | 47ef20a3cd3d6ef9ace200be56af16d9b3e02965 /classes/User.php | |
parent | 7ee9737ef67fded89fb51602b06c8f77fba97bb1 (diff) | |
parent | f086dddf43a8e1593a615e77c2fdd605623acf49 (diff) |
Merge branch '0.9.x' into adminpanel
Diffstat (limited to 'classes/User.php')
-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 6162f83b8..447a34141 100644 --- a/classes/User.php +++ b/classes/User.php @@ -722,16 +722,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(); |