Добавил проверку изображения в апи постов и ещё по мелочи

This commit is contained in:
2023-09-07 23:05:23 +03:00
parent 9a4658f3ea
commit e487ed79c4
8 changed files with 49 additions and 10 deletions

View File

@ -23,6 +23,7 @@ function EndSession () {
session_start();
$LOGGED_IN = false;
$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
@ -35,6 +36,7 @@ if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION["userid"])) { //
die("user id used in session does not exist");
}
$LOGGED_IN = true;
$THIS_USER = $_SESSION["userid"];
} elseif (session_status() === PHP_SESSION_DISABLED) { // If sessions are disabled
die("ERROR: please enable sessions in php config");
}