The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
![]() |
users/helpers/us_helpers.php ...hasPerm needs global $master_account; - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: users/helpers/us_helpers.php ...hasPerm needs global $master_account; (/showthread.php?tid=554) |
users/helpers/us_helpers.php ...hasPerm needs global $master_account; - Johnny - 04-30-2017 Hi Was trying to implement the following: on a json output php page:: if(!hasPerm([4],$user->data()->id)){ //echo ('2,3,4'); die("NO RIGHTS TO SEE THIS"); } I noticed through testing access to the page that the $master_account was NULL when used by the hasPerm function on line 767 so I added global $master_account; just under global $user; Seems to work now ![]() users/helpers/us_helpers.php ...hasPerm needs global $master_account; - MHALL1 - 06-15-2017 Thanks, I was seeing the same. Adding this has stops it logging errors ![]() |