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
Secure page not redirecting
#1
I am try to secure a page but when a user with no permission visit the page its not redirecting to index
below is my code
<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/map_header.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/user_navigation.php';
?>
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>

<div id="page-wrapper">

</div>
<?php
include $abs_us_root.$us_url_root.'usersc/includes/map_footer.php';
include $abs_us_root.$us_url_root.'users/includes/html_footer.php';

ERROR:
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Notice: Undefined variable: master_account in /home/t/users/helpers/us_helpers.php on line 438
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/t/users/helpers/us_helpers.php on line 438
?>
  Reply
#2
A few questions...
1. What folder is this page in?
2. Is that folder added to z_us_root.php

Because with your ../users it makes it look like your in a folder other than root or users. If it's not usersc then UserSpice doesn't know to look for it. So you edit that z_us_root.php file and add your folder to the array that's at the top of the file.

  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)