You are here

function enterprise_fields_about_author in Enterprise Base 7.3

1 string reference to 'enterprise_fields_about_author'
enterprise_fields_ds_fields_info in enterprise_fields/enterprise_fields.module
Implements hook_ds_fields_info().

File

enterprise_fields/enterprise_fields.module, line 83

Code

function enterprise_fields_about_author($variables) {
  if (module_exists('enterprise_user')) {
    $entity = $variables['entity'];
    $account = user_load($entity->uid);
    $view_mode = 'user_about';

    // This view mode is in enterprise_user.
    $output = l('About the Author', 'user/' . $entity->uid, array(
      'attributes' => array(
        'class' => array(
          'name',
        ),
      ),
    ));
    $user_view = user_view($account, $view_mode);
    $output .= drupal_render($user_view);
    return $output;
  }
}