function og_init in Organic groups 6
Same name and namespace in other branches
- 5.8 og.module \og_init()
- 5 og.module \og_init()
- 5.2 og.module \og_init()
- 5.3 og.module \og_init()
- 5.7 og.module \og_init()
- 6.2 og.module \og_init()
File
- ./
og.module, line 375
Code
function og_init() {
// We have to perform a load in order to assure that the $user->og_groups bits are present.
global $user;
if ($user->uid) {
$user = user_load(array(
'uid' => $user->uid,
));
}
else {
$user->og_groups = array();
}
drupal_add_css(drupal_get_path('module', 'og') . '/theme/og.css');
// Set group context and language if needed.
if ($group_node = og_determine_context()) {
og_set_theme($group_node);
og_set_group_context($group_node);
// TODOL: is this too late for menu links and such?
og_set_language($group_node);
}
}