You are here

function og_exit in Organic groups 6

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

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

See also

og_determine_context().

File

./og.module, line 400

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;
    }
  }
}