Render the field.
$values: The values retrieved from the database.
Overrides FieldPluginBase::render
function render($values) {
if (!empty($this->options['link_to_user'])) {
$account = entity_create('user', array());
$account->name = $this
->get_value($values);
$account->uid = $values->{$this->uid};
return theme('username', array(
'account' => $account,
));
}
else {
return $this
->sanitizeValue($this
->get_value($values));
}
}