PDA

View Full Version : Error if user has no rights


jluerken
02-27-2005, 12:45 PM
Hi,

I have a huge problem with the actual AWS 3.1.8 installation.
Everytime a user does something where he has no rights for, he is getting an error message.

white browser page with:
Fatal error: Call to a member function on a non-object in /pathtomyforum/forum/includes/functions.php on line 2174

Line 2174 says:

$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_options where oid='1'");


He is getting this error instead of the message that he has no right to access this page.

Is this line needed there or did I copy&paste something wrong there?

Kind regards
jluerken

sv1cec
02-28-2005, 06:39 AM
Hi,

I have a huge problem with the actual AWS 3.1.8 installation.
Everytime a user does something where he has no rights for, he is getting an error message.

white browser page with:
Fatal error: Call to a member function on a non-object in /pathtomyforum/forum/includes/functions.php on line 2174

Line 2174 says:

$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_options where oid='1'");


He is getting this error instead of the message that he has no right to access this page.

Is this line needed there or did I copy&paste something wrong there?

Kind regards
jluerken
Strange, this part of the code change, is used for users who are banned from the forums, it has nothing to do with other usage. Can you please provide me with an example if what you mean with "Everytime a user does something where he has no rights for"?

Rgds

jluerken
02-28-2005, 07:49 AM
Strange, this part of the code change, is used for users who are banned from the forums, it has nothing to do with other usage. Can you please provide me with an example if what you mean with "Everytime a user does something where he has no rights for"?

Rgds

Hi John,

I will send you some testdata now via PM.

sv1cec
02-28-2005, 08:14 AM
Hi John,

I will send you some testdata now via PM.
A little bit above that, in file functions.php, there is a line which should look like:


global $DB_site, $vboptions, $logincode, $url, $bbuserinfo, $session, $stylevar;


Make sure you have $DB_site in that line.

jluerken
02-28-2005, 08:51 AM
A little bit above that, in file functions.php, there is a line which should look like:


global $DB_site, $vboptions, $logincode, $url, $bbuserinfo, $session, $stylevar;


Make sure you have $DB_site in that line.

You are right, it was not there. Don't know why!
After adding it the problem is gone.

Thanks for your help.