}
else {
- $r = q("SELECT `profile`.*, `contact`.`avatar-date` AS picdate FROM `profile` LEFT JOIN `contact` on `contact`.`uid` = `profile`.`uid` WHERE `profile`.`uid` = %d and contact.self = 1",
+ $r = q("SELECT * FROM `profile` WHERE `uid` = %d",
local_user());
if(count($r)) {
foreach($r as $rr) {
$o .= replace_macros($tpl, array(
- '$photo' => $rr['thumb'] . '?rev=' . urlencode($rr['picdate']),
+ '$photo' => $a->get_cached_avatar_image($rr['thumb']),
'$id' => $rr['id'],
'$alt' => t('Profile Image'),
'$profile_name' => $rr['profile-name'],