As few people noticed, I'm getting an error on the home page.
I'm not able to recreate this, as I've never seen the error it happens for any user that isn't a moderator:
(http://i.imgur.com/erEpQml.png)
I only have 1.0.6 and 1.0.7 security patches, no modifications installed. Recently I've been adding Bad Behaviour to the forum. Did anyone else ever had a similar problem?
This is the line:
$user_info['is_moderator'] = $user_info['is_mod'] || allowedTo('moderate_board');
After looking into this, it seems like an issue with integration on the home page, weird to only happen recently. Only normal users can see this. I can provide the code of home page by PM.
Yep, that was my idea as well.
Now that I look at it more in details, I realized it's a bug.
I'd try to fix it by changing:
'is_admin' => in_array(1, $user_info['groups']),
to:
'is_mod' => false,
'is_admin' => in_array(1, $user_info['groups']),
in Load.php.
The issue is that is_mod is set only in loadBoard, but the function is not (always) called when using SSI.
So move the set of is_mod to loadUserSettings I think makes most sense.
That solved the issue. Nice to be catching bugs :)
Tracked. :)