Merge branch '0.9.x' into 1.0.x

This commit is contained in:
Brion Vibber
2010-03-29 15:15:51 -07:00
63 changed files with 3129 additions and 2998 deletions

View File

@@ -665,8 +665,12 @@ class User extends Memcached_DataObject
function delete()
{
$profile = $this->getProfile();
$profile->delete();
try {
$profile = $this->getProfile();
$profile->delete();
} catch (UserNoProfileException $unp) {
common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion.");
}
$related = array('Fave',
'Confirm_address',
@@ -674,6 +678,7 @@ class User extends Memcached_DataObject
'Foreign_link',
'Invitation',
);
Event::handle('UserDeleteRelated', array($this, &$related));
foreach ($related as $cls) {