class CMP_ConsoleAvatar extends OW_Component
{
public function render()
{
$userId = OW::getUser()->getId();
return '<a class="console-avatar" href="'.BOL_UserService::getInstance()->getUserUrl($userId).'"><img src="'.BOL_AvatarService::getInstance()->getAvatarUrl($userId).'"></a>';
}
}
function console_add_avatar(BASE_CLASS_ConsoleItemCollector $event)
{
if(OW::getUser()->isAuthenticated())
{
$item = new CMP_ConsoleAvatar();
$event->addItem($item, 2);
}
}
OW::getEventManager()->bind('console.collect_items', 'console_add_avatar');
Though avatar will be positioned before Username for admins and after it for simple users (unfortunately it cannot be fixed even by changing item order with additional check OW::getUser()->isAdmin() for now).
P.S. Moved the answer with attached plugin to your Avatar in header/console area thread, as it does not have any relation to initial question you've asked.