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
Restrict # pages
#5
Try reversing the logic by killing the page or redirecting somewhere if the user is not logged in or does not have permission first. Here's a an example with die();

Code:
<?php
Code:
if (!$user->isLoggedIn() || !hasPerm([2],$user->data()->id)){
Code:
die();  //or something
Code:
}else{
Code:
//the rest of your script
Code:
?>
  Reply


Messages In This Thread
Restrict # pages - by lordtyla - 09-17-2017, 12:02 PM
Restrict # pages - by Brandin - 09-17-2017, 12:21 PM
Restrict # pages - by mudmin - 09-17-2017, 12:27 PM
Restrict # pages - by lordtyla - 09-17-2017, 02:20 PM
Restrict # pages - by mudmin - 09-17-2017, 07:03 PM
Restrict # pages - by lordtyla - 09-18-2017, 02:09 PM
Restrict # pages - by karsen - 09-19-2017, 07:19 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)