Template variable freezes after user logout (?)

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Locked
Slanger
Registered User
Posts: 1
Joined: Thu Apr 04, 2013 10:13 pm

Template variable freezes after user logout (?)

Post by Slanger »

Hi guys,
so I recently added this code to "includes/functions.php":

Code: Select all

if ( !function_exists('group_memberships') )
{
 include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
 }
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
 ));
 } 
In order use that line in "overall_header.html":

Code: Select all

<!-- IF not S_GROUP_11 -->ad code here<!-- ENDIF -->
To find out whether the user is in this group or not through my template page.

Everything works well, until I logout and relogging again and I do not see any sign of the code above.
I have already tried to clean cache both in the forum and in my own browser and refresh the templates as well, still doesn't work.

Anyone?
Thanks.
Last edited by tbackoff on Fri Apr 05, 2013 3:17 am, edited 1 time in total.
Reason: Closing, duplicate here: https://www.phpbb.com/community/viewtopic.php?f=71&t=2178451

Locked