You are here

function og_exit in Organic groups 6.2

Same name and namespace in other branches
  1. 6 og.module \og_exit()

Implementation of hook_exit().

Set session variable that is used to determine group context when node is in multiple groups.

See also

og_determine_context().

File

./og.module, line 562
Code for the Organic Groups module.

Code

function og_exit() {
  global $user;
  if ($node = og_get_group_context()) {
    if ($user->uid || variable_get('cache', CACHE_DISABLED) == CACHE_DISABLED) {

      // @TODO - In D7, eliminate use of $_SESSION for anon users. See http://drupal.org/node/201122.
      $_SESSION['og_last'] = $node->nid;
    }
  }
}