function fbconnect_block_render in Facebook Connect 5
Render data for fbconnect block
1 call to fbconnect_block_render()
- fbconnect_block in ./
fbconnect.module - Implementation of hook_block().
File
- ./
fbconnect.module, line 593 - This module allows site visitors to connect and register with facebook account
Code
function fbconnect_block_render($user) {
$fbuid = fbconnect_get_fbuid();
$cid = 'fbconnect:' . $user->uid;
// Check for cached version.
if ($cached = cache_get($cid)) {
return $cached->data;
}
else {
$content = fbconnect_get_connected_friends($fbuid);
$data['friend_list'] = $content;
$data['friend_link'] = l(t('Invite your Facebook friends'), 'fbconnect/invite/friends');
$output = theme('block_fbconnect', $data, $user);
cache_set($cid, 'cache', $output, time() + FBCONNECT_USERBLOCK_CACHE_EXPIRE * 3600);
}
return $output;
}