You are here

function og_views_handler_field_og_uid_groups::init in Organic groups 6

Same name and namespace in other branches
  1. 6.2 modules/og_views/includes/og_views_handler_field_og_uid_groups.inc \og_views_handler_field_og_uid_groups::init()

Fake the field alias -- we don't want to actually join.

File

modules/og_views/includes/og_views_handler_field_og_uid_groups.inc, line 9

Class

og_views_handler_field_og_uid_groups
Field handler for displaying a list of groups for a user.

Code

function init(&$view, $options) {
  parent::init($view, $options);
  switch ($view->base_table) {
    case 'node':
      $this->additional_fields['users_uid'] = array(
        'table' => 'users',
        'field' => 'uid',
      );
      $this->field_alias = 'users_uid';
      break;
    case 'users':
      $this->field_alias = 'uid';
      break;
  }
}