3raser Posted June 2, 2012 Share Posted June 2, 2012 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. Link to comment https://forums.phpfreaks.com/topic/263552-users-can-see-administrator-and-moderator-forumsweird/ Share on other sites More sharing options...
3raser Posted June 2, 2012 Author Share Posted June 2, 2012 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"); Link to comment https://forums.phpfreaks.com/topic/263552-users-can-see-administrator-and-moderator-forumsweird/#findComment-1350669 Share on other sites More sharing options...
Skewled Posted June 3, 2012 Share Posted June 3, 2012 <?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? Link to comment https://forums.phpfreaks.com/topic/263552-users-can-see-administrator-and-moderator-forumsweird/#findComment-1350870 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.