views_handler_field_user_picture.inc in Views (for Drupal 7) 6.2
File
modules/user/views_handler_field_user_picture.inc
View source
<?php
class views_handler_field_user_picture extends views_handler_field {
function construct() {
parent::construct();
$this->additional_fields['uid'] = 'uid';
$this->additional_fields['name'] = 'name';
$this->additional_fields['mail'] = 'mail';
}
function element_type() {
return 'div';
}
function render($values) {
$account = new stdClass();
$account->uid = $values->{$this->aliases['uid']};
$account->name = $values->{$this->aliases['name']};
$account->mail = $values->{$this->aliases['mail']};
$account->picture = $values->{$this->field_alias};
return theme('user_picture', $account);
}
}