function views_handler_field_user_picture::render
Same name in other branches
- 7.x-3.x modules/user/views_handler_field_user_picture.inc \views_handler_field_user_picture::render()
Overrides views_handler_field::render
File
-
modules/
user/ views_handler_field_user_picture.inc, line 54
Class
- views_handler_field_user_picture
- Field handler to provide simple renderer that allows using a themed user link.
Code
function render($values) {
// Fake an account object.
$account = new stdClass();
if ($this->options['link_photo_to_profile']) {
// Prevent template_preprocess_user_picture from adding a link
// by not setting the uid.
$account->uid = $this->get_value($values, 'uid');
}
$account->name = $this->get_value($values, 'name');
$account->mail = $this->get_value($values, 'mail');
$account->picture = $this->get_value($values);
return theme('user_picture', $account);
}