Аватар пользователя в блоке

Главные вкладки

Аватар пользователя Urfin Urfin 10 августа 2011 в 13:45

У меня стоит еще пятерка. Не могу понять как реализовать вывод аватара активного пользователя (можно и других полей профиля) в блоке.С помощью Views не получается. Соответствующего сниппета я не нашел ни тут http://drupal.org/documentation/customization/snippets ни тут http://content-management-systems.info/drupal/snippet
Нашел вот такой простой код:

<?php
global $user;
return (bool) 
$user->uid;
?>

Он выводит id юзера...

Комментарии

Аватар пользователя sas@drupal.org sas@drupal.org 10 августа 2011 в 14:05

/**
* Theme a user page
* param $account the user object
* param $fields a multidimensional array for the fields, in the form of array (
* 'category1' => array(item_array1, item_array2), 'category2' => array(item_array3,
* .. etc.). Item arrays are formatted as array(array('title' => 'item title',
* 'value' => 'item value', 'class' => 'class-name'), ... etc.). Module names are incorporated
* into the CSS class.
*
* ingroup themeable
*/
function theme_user_profile($account, $fields) {
$output = '

';
$output .= theme('user_picture', $account);