Skip to content

Commit

Permalink
Forum: Fix author presentation if account is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Jan 20, 2025
1 parent 648041a commit 413aee9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/ILIAS/Forum/classes/class.ilObjForumGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,15 @@ private function getThreadProperties(ilForumTopic $forum_topic): array
$unread = ' (' . $unread_counter . ' ' . $this->lng->txt('unread') . ')';
}

$authorinfo = new ilForumAuthorInformation(
$forum_topic->getThrAuthorId(),
$forum_topic->getDisplayUserId(),
$forum_topic->getUserAlias(),
$forum_topic->getImportName()
);

$properties = [
$this->lng->txt('forums_created_by') => $forum_topic->getUserAlias(),
$this->lng->txt('forums_created_by') => $authorinfo->getAuthorName(),
$this->lng->txt('forums_articles') => $forum_topic->getNumPosts() . $unread,
$this->lng->txt('forums_last_post') => $this->object->Forum->convertDate($forum_topic->getLastPost()->getCreateDate()),
$this->lng->txt('visits') => $forum_topic->getVisits(),
Expand Down

0 comments on commit 413aee9

Please sign in to comment.