Expose a userProfile object to the template in MFAuthenticationForm
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 18 Nov 2020 10:52:56 +0000 (11:52 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 18 Nov 2020 13:13:17 +0000 (14:13 +0100)
wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php

index eb2e74391024cd2f7ab9f2dc8768b7387616e5f0..9d10d2b204c1ebcecb4cb62a8993a9f0f58be2e1 100644 (file)
@@ -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,
                ]);