Регистрация
Фронт (стили+страница), полировка стр. логина, микроправки и микрооптимизации
This commit is contained in:
@@ -34,7 +34,7 @@ $THIS_USER = null; // ID of logged in user
|
||||
|
||||
if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION["userid"])) { // If there are active session
|
||||
// Check if user still exist
|
||||
$s = $db->prepare("SELECT * FROM users WHERE id = ?");
|
||||
$s = $db->prepare("SELECT id FROM users WHERE id = ?");
|
||||
$s->bind_param("s", $_SESSION["userid"]);
|
||||
$s->execute();
|
||||
if (!(bool)$s->get_result()->fetch_assoc()) { // If not, then destroy session
|
||||
@@ -47,6 +47,7 @@ if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION["userid"])) { //
|
||||
die("ERROR: please enable sessions in php config");
|
||||
}
|
||||
|
||||
// HACK
|
||||
if ($Config["debug"] && isset($_REQUEST["debug"])) { // If there are not any session and debug mode is on
|
||||
// ATTENTION: FOR DEBUG PURPOSES ONLY!
|
||||
if ($_REQUEST["debug"] == "drop") {
|
||||
|
||||
Reference in New Issue
Block a user