implementation of hook_views_query_alter().

Public

Get raw version
php
  1. /**
  2.  * Implements hook_views_query_alter().
  3.  */
  4. function mymodule_views_query_alter($view, &$query) {
  5. if ($view->name == 'group_members' && $view->current_display == 'block_1') {
  6. $query->add_where_expression('AND', "node_og_membership.uid != users_og_membership.uid");
  7. }
  8. }

Comments

joelwallis's picture

Which Drupal version this snippet is targeted for?