From a8497e02f9e1934b572321aca4223314f1840bb7 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 22 Mar 2024 12:38:29 +0100 Subject: [PATCH] Add `userID` to `$data` array --- wcfsetup/install/files/lib/data/user/UserProfile.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index 92d12e9509..ba335761a8 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -738,11 +738,10 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject */ public function isAccessible(string $name, ?int $userID = null): bool { - /** @noinspection PhpVariableVariableInspection */ - $data = ['result' => true, 'name' => $name]; if ($userID === null) { $userID = WCF::getUser()->userID; } + $data = ['result' => true, 'name' => $name, 'userID' => $userID]; switch ($this->{$name}) { case self::ACCESS_EVERYONE: -- 2.20.1