Helpful Information
 
 
Category: Advanced Warning System (AWS)
Error if user has no rights

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

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

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.

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.

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.










privacy (GDPR)