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
switching index.php
#2
So if you're getting an error 500, it could also be that your server has error reporting turned off. Just go to both of those pages and just after the opening
Code:
<?php
add these two lines...

Code:
error_reporting(E_ALL);
Code:
ini_set('display_errors', 1);

See if that gives you a better explanation.

As far as what you're actually trying to accomplish, I'm not 100{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} sure if I understand you.
I'm thinking you want your

users/index.php to be your actual index.php which is fine. Just get rid of all the code in there that redirects you to the home page. If nothing else, just start with

Code:
<?php
Code:
error_reporting(E_ALL);
Code:
ini_set('display_errors', 1);
Code:
echo "This is home.";

Then on whichever page you want to react based on whether the user is logged in or not, use that same logic

Code:
if(isset($user) && $user->isLoggedIn()){
Code:
Redirect::to($us_url_root.'users/account.php');
Code:
}else{
Code:
Redirect::to($us_url_root.'users/login.php');
Code:
}
  Reply


Messages In This Thread
switching index.php - by dsuggs - 11-29-2017, 04:42 PM
switching index.php - by mudmin - 11-29-2017, 07:45 PM
switching index.php - by dsuggs - 12-15-2017, 06:53 PM
switching index.php - by s.farg - 02-13-2018, 01:22 PM
switching index.php - by mudmin - 02-13-2018, 03:54 PM
switching index.php - by s.farg - 02-13-2018, 04:17 PM
switching index.php - by mudmin - 02-13-2018, 04:20 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)