The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
banned user can't log out
#2
Recommendation: around line 373 of us_helpers.php where you have this code:

if(isset($user) && $user->data() != null){
if($user->data()->permissions==0){
bold('<br><br><br>Sorry. You have been banned. If you feel this is an error, please contact the administrator.');
die();
}
}

Instead of printing a message and dying, (1) log that user out and (2) redirect them to the login screen with a message:

Redirect::to($us_url_root.'users/login.php?err=Sorry. You have been banned. If you feel this is an error, please contact the administrator.');

Of course, login.php has to be modified to accept a $_REQUEST['err'] and appropriately display it.
  Reply


Messages In This Thread
banned user can't log out - by plb - 09-07-2016, 04:11 AM
banned user can't log out - by plb - 09-07-2016, 04:32 AM
banned user can't log out - by firestorm - 09-07-2016, 10:32 AM
banned user can't log out - by plb - 09-07-2016, 01:15 PM
banned user can't log out - by plb - 09-07-2016, 05:04 PM
banned user can't log out - by plb - 09-07-2016, 05:31 PM
banned user can't log out - by plb - 09-07-2016, 05:46 PM
banned user can't log out - by plb - 09-07-2016, 06:34 PM
banned user can't log out - by mudmin - 09-07-2016, 09:46 PM
banned user can't log out - by brian - 09-13-2016, 01:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)