From: Tim Düsterhus Date: Mon, 2 Nov 2020 13:41:30 +0000 (+0100) Subject: Integrate multifactor into AccountSecurityPage X-Git-Tag: 5.4.0_Alpha_1~555^2~53^2~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c11460efa9f10eb6b22b7ff260b239a70e7743da;p=GitHub%2FWoltLab%2FWCF.git Integrate multifactor into AccountSecurityPage --- diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 7fbbcab75c..3ad90f1700 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -1724,6 +1724,7 @@ com.woltlab.wcf.multifactor.totp com.woltlab.wcf.multifactor + mobile diff --git a/com.woltlab.wcf/templates/accountSecurity.tpl b/com.woltlab.wcf/templates/accountSecurity.tpl index d93e540c9b..12bc297d72 100644 --- a/com.woltlab.wcf/templates/accountSecurity.tpl +++ b/com.woltlab.wcf/templates/accountSecurity.tpl @@ -2,6 +2,28 @@ {include file='header' __disableAds=true __sidebarLeftHasMenu=true} +
+

{lang}wcf.user.security.multifactor{/lang}

+ + +
+

{lang}wcf.user.security.activeSessions{/lang}

diff --git a/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php b/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php index 5b70f656d2..b9711c2882 100644 --- a/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php +++ b/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php @@ -1,5 +1,7 @@ * @package WoltLabSuite\Core\Page @@ -25,6 +27,11 @@ class AccountSecurityPage extends AbstractPage { */ private $activeSessions; + /** + * @var ObjectType[] + */ + private $multifactorMethods; + /** * @inheritDoc */ @@ -36,6 +43,8 @@ class AccountSecurityPage extends AbstractPage { usort($this->activeSessions, function ($a, $b) { return $b->getLastActivityTime() <=> $a->getLastActivityTime(); }); + + $this->multifactorMethods = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.multifactor'); } /** @@ -45,7 +54,8 @@ class AccountSecurityPage extends AbstractPage { parent::assignVariables(); WCF::getTPL()->assign([ - 'activeSessions' => $this->activeSessions + 'activeSessions' => $this->activeSessions, + 'multifactorMethods' => $this->multifactorMethods, ]); }