function og_init in Organic groups 5
Same name and namespace in other branches
- 5.8 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()
- 6 og.module \og_init()
This processing cannot happen later in the request because
- menu items will be in default language if we wait until og_menu(!$may_cache). bad for locale feature
File
- ./
og.module, line 144
Code
function og_init() {
// only bother when we are not serving a cached page. check for which function 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;
if ($user->uid) {
$user = user_load(array(
'uid' => $user->uid,
));
}
else {
$user->og_groups = array();
}
require dirname(__FILE__) . '/og_views.inc';
if (module_exists('workflow_ng')) {
require dirname(__FILE__) . '/og_workflow_ng.inc';
}
og_theme();
og_set_locale();
}
}