I have used this hack (great hack by the way) and I have over 11,000 members. The problem I am having is that a large handfull of members get the "you do not have permission to access" message showing they are in fact logged in
I tried registering an account and did not have that problem. I tried logging in as one of the people haveing the problem and I got the same error they were having.
I tried replacing this:
PHP Code:
<?php
require("global.php");
if( $bbuserid ) {
$user = $DB_site->query_first( "SELECT username FROM user WHERE userid = $bbuserid" );
$bbusername = $user[username];
eval("dooutput(\"".gettemplate('main_chat')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");
} // end if
?>
with this:
PHP Code:
<?php
require("global.php");
if($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid] == 5 or $bbuserinfo[usergroupid] == 7 or $bbuserinfo[usergroupid] == 11 or $bbuserinfo[usergroupid] == 2 or $bbuserinfo[usergroupid] == 9) {
$user = $DB_site->query_first( "SELECT username FROM user WHERE userid = $bbuserid" );
$bbusername = $user[username];
eval("dooutput(\"".gettemplate('main_chat')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");
} // end if
?>
but that causes a database error only when those members that were have the nopermission page come up before. If I login as the account I registered I didn't get that error but if I logged in as one that was having trouble I get the database error.
A "view sourse" of the error page shows this:
=======================================
<!-- Database error in vBulletin 2.2.1:
Invalid SQL: SELECT username FROM user WHERE userid =
mysql error:
mysql error number: 0
Date: Saturday 26th of January 2002 12:36:00 AM
Script:
http://www.outerealms.com/vbportal/f...in_chat.php?s=
Referer:
http://www.outerealms.com/vbportal/forums/index.php?
-->
=======================================
any idea why not all registered members are getting that no permission screen and when I set the actual usergroups those same members that have probs the other way get an error and the rest don't?