Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.