You are here

function og_preprocess_author_pane in Author Pane 5

Same name and namespace in other branches
  1. 6.2 modules/og.author-pane.inc \og_preprocess_author_pane()
  2. 6 modules/og.author-pane.inc \og_preprocess_author_pane()
  3. 7.2 modules/og.author-pane.inc \og_preprocess_author_pane()

Implementation of hook_preprocess_author_pane().

File

modules/og.author-pane.inc, line 11
This file provides a preprocess function on behalf of the OG module.

Code

function og_preprocess_author_pane(&$variables) {
  $account = $variables['account'];
  if (isset($account->og_groups) && !empty($account->og_groups)) {
    $groups = array();
    foreach ($account->og_groups as $og_id => $og) {
      $groups[] = l($og['title'], 'node/' . $og['nid']);
    }
    $variables['og_groups'] = implode(', ', $groups);
  }
  else {
    $variables['og_groups'] = t('None');
  }
}