From 5b4d8833e8e8786da23247baea7011423903f5ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 17 Nov 2020 14:59:48 +0100 Subject: [PATCH] Add Setup::getUser() method --- .../files/lib/system/user/multifactor/Setup.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/system/user/multifactor/Setup.class.php b/wcfsetup/install/files/lib/system/user/multifactor/Setup.class.php index edc54a6b04..c129893b8d 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/Setup.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/Setup.class.php @@ -4,6 +4,7 @@ use wcf\data\IIDObject; use wcf\data\object\type\ObjectType; use wcf\data\object\type\ObjectTypeCache; use wcf\data\user\User; +use wcf\system\cache\runtime\UserRuntimeCache; use wcf\system\WCF; /** @@ -46,6 +47,13 @@ final class Setup implements IIDObject { return ObjectTypeCache::getInstance()->getObjectType($this->row['objectTypeID']); } + /** + * Returns the user. + */ + public function getUser(): User { + return UserRuntimeCache::getInstance()->getObject($this->row['userID']); + } + /** * Locks the database record for this setup, preventing concurrent changes, and returns itself. */ -- 2.20.1