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
checkMenu Page
#2
Ok. So you have access to a few things already.

You have
$currentPage
which gives you the page name and you have
$pagePermissions = fetchPagePermissions($id);
which gives you the permissions for that page if you have the id.

So all you need to do is to do a db query from the pages table to get the id of the current page.

Then you can run
$pagePermissions = fetchPagePermissions($id);

Then you can build an array of permission ids from that.

After that, the normal hasPerm function will work like it always has.

I hope that's a point in the right direction.
  Reply


Messages In This Thread
checkMenu Page - by Brandin - 06-24-2017, 12:57 PM
checkMenu Page - by mudmin - 06-24-2017, 01:16 PM
checkMenu Page - by Brandin - 06-24-2017, 01:25 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)