alzander wrote: When the 5.0 release is out, feel free to update this thread, and we'll give you the code that (should) do exactly what you're looking for.
} else //Logged in successfully
{
/* Don't import on just a mapping update, for now. Need to investigate.
$jUser = JFactory::getUser();
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
$fbUserId = $jfbcLibrary->getMappedFbUserId();
$args = array($jUser->get('id'), $fbUserId);
JPluginHelper::importPlugin('jfbcprofiles');
$app->triggerEvent('scProfilesImportProfile', $args);
$app->enqueueMessage('Profile Imported!');*/
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_jfbconnect/' . 'models');
} else //Logged in successfully
{
JPluginHelper::importPlugin('socialprofiles');
$jUser = JFactory::getUser();
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
$fbUserId = $jfbcLibrary->getMappedFbUserId();
$args = array('facebook', $jUser->get('id'), $fbUserId);
$app->triggerEvent('socialProfilesOnLogin', $args);
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_jfbconnect/' . 'models');
trigger_error('Say hello to my little friend', E_ERROR);
if ($userMapModel->mapUser($fbUserId))
$app->enqueueMessage(JText::_('COM_JFBCONNECT_MAP_USER_SUCCESS'));
else
$app->enqueueMessage(JText::_('COM_JFBCONNECT_MAP_USER_FAIL'));
if ($userMapModel->mapUser($fbUserId)) {
JPluginHelper::importPlugin('socialprofiles');
$args = array('facebook', $user->id, $fbUserId);
$app->triggerEvent('socialProfilesOnLogin', $args);
$app->enqueueMessage(JText::_('COM_JFBCONNECT_MAP_USER_SUCCESS'));
} else
$app->enqueueMessage(JText::_('COM_JFBCONNECT_MAP_USER_FAIL'));
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.