Skip to main content
Topic: Error on the home page (Read 1778 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Error on the home page

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:



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:
Code: [Select]
$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.
Last Edit: May 08, 2016, 04:32:03 pm by CrimeS
http://studiocrimes.com - Premium & Free SMF/ElkArte Themes

Re: Error on the home page

Reply #1

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:
Code: [Select]
		'is_admin' => in_array(1, $user_info['groups']),
to:
Code: [Select]
		'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.
Bugs creator.
Features destroyer.
Template killer.

Re: Error on the home page

Reply #2

That solved the issue. Nice to be catching bugs :)

Re: Error on the home page

Reply #3

Tracked. :)
Bugs creator.
Features destroyer.
Template killer.