- &$addSession: whether to add session variable
- &$url: resulting URL to local resource
+StartProfileGetAvatar: When getting an avatar for a profile
+- $profile: profile
+- $size: size of the avatar
+- &$avatar: avatar
+
+EndProfileGetAvatar: After getting an avatar for a profile
+- $profile: profile
+- $size: size of the avatar
+- &$avatar: avatar
if (is_null($height)) {
$height = $width;
}
- return Avatar::pkeyGet(array('profile_id' => $this->id,
- 'width' => $width,
- 'height' => $height));
+
+ $avatar = null;
+
+ if (Event::handle('StartProfileGetAvatar', array($this, $width, &$avatar))) {
+ $avatar = Avatar::pkeyGet(array('profile_id' => $this->id,
+ 'width' => $width,
+ 'height' => $height));
+ Event::handle('EndProfileGetAvatar', array($this, $width, &$avatar));
+ }
+
+ return $avatar;
}
function getOriginalAvatar()