In OA I'm trying to set the default page to a group i.e. I've selected the开发者_如何转开发n put in a group name for example 'intranet' but this says that the page does not exist...
Does anybody know how I can default the front page to a specific group when users log in?
You need your group's nid/gid...Go to your group's page and click the 'edit' tab, you should see something like "node/123/edit" or "group/123/edit". The number in the middle is your node ID or group ID. if the path starts with 'node' your front page will be "node/node_id", if it's group your front page will be "group/group_id".
Hope that makes sense
A bit late replication but hope it will help someone else.
You can use function hook_user()
with $op 'login'
.
yourmoudlename_user($op, &$edit, &$account) {
if ($op == 'login') {
$groups = $account->og_groups;
// redirect to the first group of user
if ($groups) {
$groups = array_values($groups);
$group_node = node_load($groups[0]['nid']);
$_REQUEST['destination'] = $group_node->purl;
}
}
}
精彩评论