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
Problems with "hasPerm" function
#3
The modification of the file "us_helpers.php", adding the declaration of the variable "master_account" as global inside the function "hasPerm", has worked for me. This way:

Code:
function hasPerm($permissions, $id) {
Code:
$db = DB::getInstance();
Code:
global $user;
Code:
global $master_account;   //THIS IS THE NEW LINE
Code:
//Grant access if master user
Code:
$access = 0;

Can anyone verify if this is a correct way to fix this problem, please?
  Reply


Messages In This Thread
Problems with "hasPerm" function - by bladerunner - 08-31-2017, 05:57 AM
Problems with "hasPerm" function - by Brandin - 08-31-2017, 11:19 AM
Problems with "hasPerm" function - by bladerunner - 09-01-2017, 04:35 AM
Problems with "hasPerm" function - by mudmin - 09-01-2017, 12:25 PM
Problems with "hasPerm" function - by Brandin - 09-01-2017, 12:25 PM
Problems with "hasPerm" function - by mudmin - 09-01-2017, 04:01 PM
Problems with "hasPerm" function - by Brandin - 09-01-2017, 04:11 PM
Problems with "hasPerm" function - by bladerunner - 09-04-2017, 04:45 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)