<?php defined('COT_CODE') or die('Wrong URL');
/* ====================
[BEGIN_COT_EXT]
Hooks=users.profile.tags,users.edit.tags
Tags=users.profile.tpl:{PHP|hybridauth_accounts}
[END_COT_EXT]
==================== */
// Displays social accounts linking/unlinking buttons in profile
require_once cot_incfile('hybridauth', 'plug');
hybridauth_accounts(null, $t);
global $hybridauth_config;
$temp_array = array();
// Sync extra fields if necessary
foreach ($hybridauth_config['providers'] as $key => $val)
{
$name = strtolower($key);
if ($val['enabled'])
{
if(!empty($urr['user_'.$name.'_id'])) {
$temp_array['USERS_HYBRIDAUTH_'.strtoupper($name.'_id')] = $urr['user_'.$name.'_id'];
$temp_array['USERS_HYBRIDAUTH_'.strtoupper($name.'_url')] = $urr['user_'.$name.'_url'];
}
}
}
$t->assign($temp_array);