Update profile-controller.php

This commit is contained in:
2026-06-01 23:18:52 +02:00
parent 28511e0cc4
commit d01be7d84c
+4 -5
View File
@@ -11,17 +11,16 @@ if (!isset($_SESSION["user"])) {
exit();
}
$user = $dao->findUser($_SESSION["user_email"] ?? "");
/*try {
$author = $user->getAuthor();
try {
$user = $dao->findUser($_SESSION["user_email"] ?? "");
$articleManager = ArticleManager::getInstance();
$userArticles = $articleManager->getArticlesByAuthor($author);
$userArticles = $articleManager->getArticlesByAuthor($user);
if(!isset($userArticles)) {
$_SESSION["message"] = "user_has_no_articles";
}
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
}*/
}
if (!$user) {
$_SESSION = [];