<?php
// imagecache preset for user picture
function assistng_user_picture($account, $size = 'user_picture') {
if (variable_get('user_pictures', 0)) {
// Display the user's photo if available
if ($account->picture && file_exists($account->picture)) {
$picture = theme('imagecache', $size, $account->picture);
}
// Provide default image
else if (variable_get('user_picture_default', '')) {
$picture = theme('imagecache', $size, variable_get('user_picture_default', ''));
}
return '<div class="picture">'.$picture.'</div>';
}
}
?>Drupal 6 - user picture imagecache
By Marek Sotak on Mon, 2012-04-02 10:08