diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Avatar.php | 2 | ||||
-rw-r--r-- | classes/User.php | 6 | ||||
-rw-r--r-- | classes/User_group.php | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/classes/Avatar.php b/classes/Avatar.php index 64f105179..cc7a6b647 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -102,6 +102,6 @@ class Avatar extends Memcached_DataObject static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', AVATAR_STREAM_SIZE => 'stream', AVATAR_MINI_SIZE => 'mini'); - return theme_path('default-avatar-'.$sizenames[$size].'.png'); + return Theme::path('default-avatar-'.$sizenames[$size].'.png'); } } 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(); diff --git a/classes/User_group.php b/classes/User_group.php index 310ecff1e..b92638f7a 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -34,7 +34,7 @@ class User_group extends Memcached_DataObject static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', AVATAR_STREAM_SIZE => 'stream', AVATAR_MINI_SIZE => 'mini'); - return theme_path('default-avatar-'.$sizenames[$size].'.png'); + return Theme::path('default-avatar-'.$sizenames[$size].'.png'); } function homeUrl() |