From e7a6ff8a0e614de113e88f81244ceada11bdadfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 3 May 2018 13:40:33 -0300 Subject: [PATCH] Remove duplicated input in application_configure.twig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some coding style fixes. Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/classes/Plugins/TwoFactor/Application.php | 5 +++-- templates/login/twofactor/application_configure.twig | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/classes/Plugins/TwoFactor/Application.php b/libraries/classes/Plugins/TwoFactor/Application.php index 9993145a50..3056af3e46 100644 --- a/libraries/classes/Plugins/TwoFactor/Application.php +++ b/libraries/classes/Plugins/TwoFactor/Application.php @@ -90,14 +90,15 @@ class Application extends TwoFactorPlugin */ public function setup() { + $secret = $this->_twofactor->config['settings']['secret']; $inlineUrl = $this->_google2fa->getQRCodeInline( 'phpMyAdmin (' . $this->getAppId(false) . ')', $this->_twofactor->user, - $this->_twofactor->config['settings']['secret'] + $secret ); return Template::get('login/twofactor/application_configure')->render([ 'image' => $inlineUrl, - 'secret' => $_SESSION['2fa_application_key'] + 'secret' => $secret ]); } diff --git a/templates/login/twofactor/application_configure.twig b/templates/login/twofactor/application_configure.twig index 05f45b51af..b801920379 100644 --- a/templates/login/twofactor/application_configure.twig +++ b/templates/login/twofactor/application_configure.twig @@ -1,14 +1,13 @@ {{ Url_getHiddenInputs() }}

-{% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %} + {% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %}

- +

- {% trans "Secret/key:" %} {{ secret }} + {% trans "Secret/key:" %} {{ secret }}

- - +