From bd2f34f559605de53831940631cac400c43998d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Nov 2020 11:52:56 +0100 Subject: [PATCH] Expose a userProfile object to the template in MFAuthenticationForm --- .../files/lib/form/MultifactorAuthenticationForm.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php index eb2e743910..9d10d2b204 100644 --- a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php +++ b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php @@ -4,6 +4,7 @@ use wcf\data\object\type\ObjectType; use wcf\data\user\User; use wcf\form\AbstractFormBuilderForm; use wcf\system\application\ApplicationHandler; +use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\PermissionDeniedException; use wcf\system\request\LinkHandler; @@ -170,6 +171,7 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm { WCF::getTPL()->assign([ 'setups' => $this->setups, 'user' => $this->user, + 'userProfile' => UserProfileRuntimeCache::getInstance()->getObject($this->user->userID), 'setup' => $this->setup, 'redirectUrl' => $this->redirectUrl, ]); -- 2.20.1