Add account security page
authorjoshuaruesweg <ruesweg@woltlab.com>
Mon, 26 Oct 2020 13:58:50 +0000 (14:58 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Mon, 2 Nov 2020 14:43:05 +0000 (15:43 +0100)
com.woltlab.wcf/page.xml
com.woltlab.wcf/templates/accountSecurity.tpl [new file with mode: 0644]
com.woltlab.wcf/userMenu.xml
wcfsetup/install/files/lib/page/AccountSecurityPage.class.php [new file with mode: 0644]
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index f47b04c5cb943ead3a4e7eaa3e990589e3479a5e..bfdbaedc5f0d1fa9a8721e9f87101f7175723ceb 100644 (file)
                                <title>Benutzerkonto-Verwaltung</title>
                        </content>
                </page>
+               <page identifier="com.woltlab.wcf.AccountSecurity">
+                       <pageType>system</pageType>
+                       <controller>wcf\page\AccountSecurityPage</controller>
+                       <name language="de">Benutzerkonto-Sicherheit</name>
+                       <name language="en">Account Security</name>
+                       <content language="en">
+                               <title>Account Security</title>
+                       </content>
+                       <content language="de">
+                               <title>Benutzerkonto-Sicherheit</title>
+                       </content>
+               </page>
                <page identifier="com.woltlab.wcf.AvatarEdit">
                        <pageType>system</pageType>
                        <controller>wcf\form\AvatarEditForm</controller>
diff --git a/com.woltlab.wcf/templates/accountSecurity.tpl b/com.woltlab.wcf/templates/accountSecurity.tpl
new file mode 100644 (file)
index 0000000..ccb4ffa
--- /dev/null
@@ -0,0 +1,7 @@
+{include file='userMenuSidebar'}
+
+{include file='header' __disableAds=true __sidebarLeftHasMenu=true}
+
+{* @TODO *}
+
+{include file='footer' __disableAds=true}
index 0bca42fdb92f8a3dfa47e1464779f08407e14166..1b0553fb230f743e6a16b0e3789d058e6eb0d5d7 100644 (file)
                        <parent>wcf.user.menu.profile</parent>
                        <showorder>1</showorder>
                </usermenuitem>
+               <usermenuitem name="wcf.user.menu.profile.security">
+                       <controller>wcf\page\AccountSecurityPage</controller>
+                       <parent>wcf.user.menu.profile</parent>
+                       <showorder>2</showorder>
+               </usermenuitem>
                <usermenuitem name="wcf.user.menu.profile.avatar">
                        <controller>wcf\form\AvatarEditForm</controller>
                        <parent>wcf.user.menu.profile</parent>
-                       <showorder>2</showorder>
+                       <showorder>3</showorder>
                </usermenuitem>
                <usermenuitem name="wcf.user.menu.profile.signature">
                        <controller>wcf\form\SignatureEditForm</controller>
                        <parent>wcf.user.menu.profile</parent>
                        <options>module_user_signature</options>
                        <permissions>user.signature.canEditSignature</permissions>
-                       <showorder>3</showorder>
+                       <showorder>4</showorder>
                </usermenuitem>
                <!-- /profile -->
                <!-- settings -->
diff --git a/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php b/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php
new file mode 100644 (file)
index 0000000..dbd0061
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+namespace wcf\page;
+use wcf\system\menu\user\UserMenu;
+
+/**
+ * Shows the account security page.
+ *
+ * @author     Joshua Ruesweg
+ * @copyright  2001-2020 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    WoltLabSuite\Core\Page
+ * @since       5.4
+ */
+class AccountSecurityPage extends AbstractPage {
+       /**
+        * @inheritDoc
+        */
+       public $loginRequired = true;
+       
+       /**
+        * @inheritDoc
+        */
+       public function show() {
+               // set active tab
+               UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.profile.security');
+               
+               parent::show();
+       }
+}
index a0ebe1cc2359924ba0c4a0c6cdd04ff08b7d2e8a..de506e68455c6e15fda39bd73019c7dcaa76392c 100644 (file)
@@ -4743,6 +4743,7 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else}
                <item name="wcf.user.menu.community.ignoredUsers"><![CDATA[Blockierte Benutzer]]></item>
                <item name="wcf.user.menu.profile"><![CDATA[Benutzerkonto]]></item>
                <item name="wcf.user.menu.profile.accountManagement"><![CDATA[Verwaltung]]></item>
+               <item name="wcf.user.menu.profile.security"><![CDATA[Sicherheit]]></item>
                <item name="wcf.user.menu.profile.avatar"><![CDATA[Avatar]]></item>
                <item name="wcf.user.menu.profile.signature"><![CDATA[Signatur]]></item>
                <item name="wcf.user.menu.settings"><![CDATA[Einstellungen]]></item>
index 0863d05e37a7de6df22384b3a41648f59f6dc426..b05416d05209f9d5d6fad37a54c66f5f56692e3a 100644 (file)
@@ -4741,6 +4741,7 @@ not register with us.]]></item>
                <item name="wcf.user.menu.community.ignoredUsers"><![CDATA[Blocked Users]]></item>
                <item name="wcf.user.menu.profile"><![CDATA[User Account]]></item>
                <item name="wcf.user.menu.profile.accountManagement"><![CDATA[Account Management]]></item>
+               <item name="wcf.user.menu.profile.security"><![CDATA[Security]]></item>
                <item name="wcf.user.menu.profile.avatar"><![CDATA[Avatar]]></item>
                <item name="wcf.user.menu.profile.signature"><![CDATA[Signature]]></item>
                <item name="wcf.user.menu.settings"><![CDATA[Settings]]></item>