You are here

function theme_userreference_formatter_default in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/userreference/userreference.module \theme_userreference_formatter_default()
  2. 6 modules/userreference/userreference.module \theme_userreference_formatter_default()

Theme function for 'default' userreference field formatter.

File

modules/userreference/userreference.module, line 251
Defines a field type for referencing a user from a node.

Code

function theme_userreference_formatter_default($element) {
  $output = '';
  if (isset($element['#item']['uid']) && ($account = user_load(array(
    'uid' => $element['#item']['uid'],
  )))) {
    $output = theme('username', $account);
  }
  return $output;
}