--- og.module.orig Fri Jun 2 21:41:05 2006 +++ og.module Sat Jun 3 15:00:14 2006 @@ -58,7 +58,12 @@ function og_menu($may_cache) { $items[] = array('path' => 'og/remove_node', 'type' => MENU_CALLBACK, 'callback' => 'og_remove_node', 'access' => $access, 'title' => t('remove post from group')); $items[] = array('path' => 'og/feed', 'callback' => 'og_feed', 'title' => t('group feed'), 'type' => MENU_CALLBACK, 'access' => user_access('access content')); } - else { + else { // only bother when we are not serving a cached page. check for which functon that only exists afterwards + + $user = user_load(array('uid' => $user->uid)); + og_theme(); + + // we get a NOTICE if doing this from within og_theme() so I do it here for now. $_SESSION['og_last'] = og_get_group_context(); @@ -89,11 +94,6 @@ function og_menu($may_cache) { function og_init() { // only bother when we are not serving a cached page. check for which functon that only exists afterwards if (function_exists('drupal_set_content')) { - // we have to perform a load in order to assure that the $user->og_groups bits are present. - global $user; - $user = user_load(array('uid' => $user->uid)); - og_theme(); - if (module_exist('views')) { include drupal_get_path('module', 'og'). '/og_views.inc'; }