11-29-2017, 07:45 PM
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 add these two lines...
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
Then on whichever page you want to react based on whether the user is logged in or not, use that same logic
Code:
<?php
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:
}