defined('_JEXEC') or die('Restricted access');
require_once (JPATH_ROOT . DS . 'components' . DS . 'com_jlinked' . DS . 'libraries' . DS . 'linkedinprofile.php');
include_once(JPATH_SITE . DS . 'components' . DS . 'com_jlinked' . DS . 'libraries' . DS . 'jlinkeddata.php');
class plgJLinkedProfilesMyComponent extends JLinkedProfileLibrary
{
function __construct(&$subject, $params)
{
$this->settings = array();
$this->_componentFolder = JPATH_SITE; // can put a Directory here to check that your component is installed
parent::__construct($subject, $params);
}
function jlinkedProfilesOnRegister($joomlaId)
{
$socialUserId = $this->socialLibrary->getLinkedInMemberId();
$this->migrateSocialAvatarToProfile($joomlaId, $socialUserId);
}
function updateAvatar($socialAvatar, $userId, $liUserId)
{
$socialAvatarFile = $this->getAvatarPath() . DS . $socialAvatar;
// File is now saved on your server at $socialAvatarFile. Move it, save it, or do what you want here.
}
}
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.