function fbconnect_theme_user_picture_override in Facebook Connect 6
Same name and namespace in other branches
- 6.2 fbconnect.module \fbconnect_theme_user_picture_override()
Our replacement for theme('user_picture', ...)
1 string reference to 'fbconnect_theme_user_picture_override'
- fbconnect_theme_registry_alter in ./
fbconnect.module - Implementation of hook_theme_registry_alter().
File
- ./
fbconnect.module, line 837
Code
function fbconnect_theme_user_picture_override($account) {
if (!isset($account->fbuid)) {
$user_data = unserialize(db_result(db_query('SELECT data FROM {users} WHERE uid = %d', $account->uid)));
$account->fbuid = @$user_data['fbuid'];
$account->fb_avatar = @$user_data['fb_avatar'];
}
// First learn the Facebook id
$fbuid = $account->fbuid;
$user_url = url('user/' . $account->uid);
if ($fbuid && $account->fb_avatar) {
$output = theme('fbconnect_user_picture_override', $fbuid, $account, $user_url, variable_get('fbconnect_pic_size', 'square'), variable_get('fbconnect_pic_logo', TRUE));
}
else {
$output = theme('fbconnect_user_picture_orig', $account);
// Markup without fb_connect.
}
return $output;
}