From d4abb3396c75abed5f355495076d9662d8d7e346 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 22 Aug 2022 19:26:56 +0000 Subject: [PATCH] Improve handling of profile page Signed-off-by: Christopher Ng --- core/Controller/ProfilePageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php index 5a1c8a68e6b..c819a75f867 100644 --- a/core/Controller/ProfilePageController.php +++ b/core/Controller/ProfilePageController.php @@ -91,7 +91,7 @@ class ProfilePageController extends Controller { ); $targetUser = $this->userManager->get($targetUserId); - if (!$targetUser instanceof IUser) { + if (!($targetUser instanceof IUser) || !$targetUser->isEnabled()) { return $profileNotFoundTemplate; } $visitingUser = $this->userSession->getUser(); -- 2.39.5