Jump to content

Users can see administrator and moderator forums...weird!


3raser

Recommended Posts

Link to my code: http://pastebin.com/KUuZ5DqX

 

For some reason, my users can see the administrator and moderator forums. I honestly can't seem to locate the reason for this. The really weird thing about it is that they can't see the forum icons (like a_mod.png and mod.png) that go with that forum. They see the default icon.

 

Any tips on why this is happening?

 

Thanks.

I should have clarified a bit more:

 

$row['type'] is the forum type. 4 means it's a moderator forum, and 5 means it's an administrator forum. The rest are just other forums but still available for everyone to see.

 

And my query:

 

//get forums
$query_two = mysql_query("SELECT `id`,`icon`,`title`,`description`,`type` FROM `forums` WHERE `parent` = '{$row['id']}' ORDER BY `id` ASC");

<?php
                                              if($row2['type'] == 4 && acc_status(getUsername()) > 1)
                                                                       {
                                                                             }
                                                           elseif($row2['type'] == 5 && acc_status(getUsername()) > 2)
                                                                       {
                                                                             }
                                                                  else
                                                                       {
                                                                            }
?>

 

What is the value the getUsername() function is returning? Is the default value for this 0 for normal users?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.