diff options
author | Evan Prodromou <evan@status.net> | 2010-03-28 15:25:02 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-28 15:25:02 -0400 |
commit | f0d905112ede6e45594b6ceceea3a6af4d9954f9 (patch) | |
tree | 4f10a268f5ea5f93ac3cb558972fed8360ce7993 /classes | |
parent | 5b7b38ab661c9556800db1e822748b2d0c16d225 (diff) | |
parent | 482faf661451b499240eb41234234607355e3aa8 (diff) |
Merge branch 'master' into 0.9.x
Conflicts:
lib/attachmentlist.php
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/classes/User.php b/classes/User.php index 8ad2ec63d..659ec9467 100644 --- a/classes/User.php +++ b/classes/User.php @@ -670,8 +670,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', @@ -679,6 +683,7 @@ class User extends Memcached_DataObject 'Foreign_link', 'Invitation', ); + Event::handle('UserDeleteRelated', array($this, &$related)); foreach ($related as $cls) { |