2009-07-06, 11:04 AM
I did used it this code to know is the user banned or not, if he/she is banned then print a message, but a problem occur. which is, a full forum page contain an error like "You has been banned" when I used the code, instead of my text that I want it to appear.
I just want the page to display "You are banned" and exit from the page( do not excute the remaining code ).
how can I used that? I mean if($mybb->user['usergroup']=="7") didn't excuted, I think there is an if like this in global.php
What is the solution?
thank's in advance
chdir('../'); // path to MyBB
define("IN_MYBB", 1);
require './global.php';
if($mybb->user['usergroup']=="7")
{
echo "You are banned.";//I just want this to appear not a full web
//page contains an error
exit;
}
I just want the page to display "You are banned" and exit from the page( do not excute the remaining code ).
how can I used that? I mean if($mybb->user['usergroup']=="7") didn't excuted, I think there is an if like this in global.php
What is the solution?
thank's in advance