You are here

function shoutbox_user_query_shouts_alter in Shoutbox 7

Same name and namespace in other branches
  1. 7.2 shoutbox_user/shoutbox_user.module \shoutbox_user_query_shouts_alter()

Implements hook_query_TAG_alter().

File

shoutbox_user/shoutbox_user.module, line 115

Code

function shoutbox_user_query_shouts_alter(QueryAlterableInterface $query) {
  $uid = $query
    ->getMetaData('shoutbox_user');
  if ($query
    ->hasTag('shouts') && NULL != $uid) {
    $query
      ->join('shoutbox_user', 'u', 's.shout_id = u.shout_id');
    $query
      ->condition('u.uid', $uid, '=');
  }
}