From c09c7ecfa3a10a59fc1ac15b70c583b79eb5afa0 Mon Sep 17 00:00:00 2001 From: NOrtmann1 Date: Fri, 17 Jul 2026 17:41:41 +0200 Subject: [PATCH] Update showArticle-controller.php --- php/controller/showArticle-controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/controller/showArticle-controller.php b/php/controller/showArticle-controller.php index 61c6f99..fcd240a 100644 --- a/php/controller/showArticle-controller.php +++ b/php/controller/showArticle-controller.php @@ -5,6 +5,7 @@ if (session_status() === PHP_SESSION_NONE) { require_once 'php/model/Article.php'; require_once 'php/model/ArticleManager.php'; +require_once 'php/model/UserManager.php'; require_once 'php/model/CommentManager.php'; if (isset($_GET["id"]) && !empty($_GET["id"])){ @@ -19,6 +20,9 @@ if (isset($_GET["id"]) && !empty($_GET["id"])){ $author = $article->getAuthor(); $tags = $article->getTags(); $articleObj = $article; // Objekt für die Like-Abfagen sichern + + $userManager = UserManager::getInstance(); + $name = $userManager->findUser($author)["vorname"]; }else{ //header("location: index.php?pfad=404"); include_once "content/404.php";