$_SESSION['og_user_roles'] is getting set for anonymous users and logged-in users.

This caused problems with caching (especially with Varnish) through the whole site, as cookies mean that cached pages aren't being used.

I've made a patch to stop the variable being set for anonymous users, which I'll attach below.

CommentFileSizeAuthor
#1 session_fix-1149328-1.patch3.47 KBlazysoundsystem

Comments

lazysoundsystem’s picture

Status: Active » Needs review
StatusFileSize
new3.47 KB

Here's the patch - replaces $user variable with $account and tests whether the $user is anonymous or not before setting session variables.