The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
Permissions
#2
There are not built in functions for doing that, but I could definitely see the use case for it. By default those permissions are designed only to control access to particular pages, but there is no reason why that functionality could not be extended.

Just fyi, you can always get the id of the logged in user by putting
Code:
$user->data()->id;

You'll notice that we also do something similar with the menus. The menu looks at the permission level of the logged in user. In fact, there is a function for that.

Code:
if (checkMenu(2,$user->data()->id)){  //Links for permission level 2 (default admin) ?>

You may want to play with that checkMenu function. It might be a slightly faster (but less flexible) way to do that rather than querying manually.
  Reply


Messages In This Thread
Permissions - by Sebastian - 08-23-2016, 10:39 AM
Permissions - by mudmin - 08-23-2016, 12:38 PM
Permissions - by Sebastian - 08-24-2016, 05:11 AM
Permissions - by mudmin - 08-24-2016, 12:44 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)