changed it to give info as to why logged in people cant log in or register..

This commit is contained in:
Richard Mikloš 2024-01-26 17:55:17 +01:00
parent 0397365958
commit f137ba2290
3 changed files with 11 additions and 2 deletions

@ -57,14 +57,14 @@ if(empty($page)){
}
}
if($page == 'login') {
/* if($page == 'login') {
if(isset($_SESSION["user_id"])){
$page = 'index';
}
else{
$page = 'login';
}
}
} */
// Check if the user is logged in
if (isset($_SESSION['user_id'])) {

4
pages/user/login.html Normal file

@ -0,0 +1,4 @@
<!--PAGENAME=Already logged in-->
<!--PAGESTYLE=/styles/pages/admin/style.css-->
<h1>I'm sorry, you are already logged in.</h1>

5
pages/user/register.html Normal file

@ -0,0 +1,5 @@
<!--PAGENAME=Already logged in-->
<!--PAGESTYLE=/styles/pages/admin/style.css-->
<h1>I'm sorry, you are already logged in.</h1>
<h2>you have to <a href="/logout">logout</a> to be able to register</h2>