function commons_roots_thumb_user_picture in Drupal Commons 6.2
2 calls to commons_roots_thumb_user_picture()
- heartbeat-message-row.tpl.php in themes/
commons_roots/ heartbeat-message-row.tpl.php - Template file for one row, rendered by heartbeat
- views-view-field--picture.tpl.php in themes/
commons_roots/ views-view-field--picture.tpl.php
File
- themes/
commons_roots/ template.php, line 303
Code
function commons_roots_thumb_user_picture($picture, $imagecache_preset, $user_name, $user_uid) {
if (!isset($picture) || $picture == '') {
$picture = variable_get('user_picture_default', '');
}
$img = theme('imagecache', $imagecache_preset, $picture, $user_name, $user_name);
if (user_access('access user profiles')) {
return l($img, "user/{$user_uid}", array(
'html' => TRUE,
));
}
else {
return $img;
}
}