Active
Project:
Primary Group
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2012 at 16:45 UTC
Updated:
12 Sep 2016 at 06:05 UTC
Jump to comment: Most recent
Comments
Comment #1
jvieille commentedI used this module to ensure a consistent experience for anonymous user, in order to associate a predictible context to multiple group posts. I modified this function in og.module to end up with this code:
- the first if in elsif keeps the logged in user in the current group
- the second selects the primary group if the fist if does not get through (this is the case for anonymous users)
- the third one selects a random group as usual if the primary group was not set
This function add
$_SESSION['og_last'] = $node->nid;as a tweak to remind the group context because the function og_exit is inoperant with my Pressflow install.