From 0141995679565785ce69404ab58139ca6a486134 Mon Sep 17 00:00:00 2001 From: trendschau Date: Sun, 7 Jan 2024 19:00:15 +0100 Subject: [PATCH] V2.1.0 Rename auth code to login verification code --- .../typemill/Controllers/ControllerWebAuth.php | 18 +++++++++--------- system/typemill/author/auth/authcode.twig | 6 +++--- system/typemill/settings/system.yaml | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/system/typemill/Controllers/ControllerWebAuth.php b/system/typemill/Controllers/ControllerWebAuth.php index 4065880..36c2671 100644 --- a/system/typemill/Controllers/ControllerWebAuth.php +++ b/system/typemill/Controllers/ControllerWebAuth.php @@ -26,8 +26,8 @@ class ControllerWebAuth extends Controller $validation = new Validation(); $securitylog = $this->settings['securitylog'] ?? false; $authcodeactive = $this->settings['authcode'] ?? false; - $authtitle = Translations::translate('Auth code missing?'); - $authtext = Translations::translate('If you did not receive an email with an authentication code, then the username or password you entered was wrong. Please try again.'); + $authtitle = Translations::translate('Verification code missing?'); + $authtext = Translations::translate('If you did not receive an email with the verification code, then the username or password you entered was wrong. Please try again.'); if($validation->signin($input) !== true) { @@ -103,8 +103,8 @@ class ControllerWebAuth extends Controller $mail = new SimpleMail($this->settings); - $subject = Translations::translate('Your authentication code for Typemill'); - $message = Translations::translate('Use the following authentication code to login into Typemill') . ': ' . $authcodevalue; + $subject = Translations::translate('Your verification code for Typemill'); + $message = Translations::translate('Use the following verification code to login into Typemill') . ': ' . $authcodevalue; $send = $mail->send($userdata['email'], $subject, $message); @@ -113,7 +113,7 @@ class ControllerWebAuth extends Controller if(!$send) { $authtitle = Translations::translate('Error sending email'); - $authtext = Translations::translate('We could not send the email with the authentication code to your address. Reason: ') . $mail->error; + $authtext = Translations::translate('We could not send the email with the verification code to your address. Reason: ') . $mail->error; } else { @@ -169,10 +169,10 @@ class ControllerWebAuth extends Controller { if($securitylog) { - \Typemill\Static\Helpers::addLogEntry('login: invalid authcode format'); + \Typemill\Static\Helpers::addLogEntry('login: invalid verification code format'); } - $this->c->get('flash')->addMessage('error', Translations::translate('Invalid authcode format, please try again.')); + $this->c->get('flash')->addMessage('error', Translations::translate('Invalid verification code format, please try again.')); return $response->withHeader('Location', $this->routeParser->urlFor('auth.show'))->withStatus(302); } @@ -199,10 +199,10 @@ class ControllerWebAuth extends Controller { if($securitylog) { - \Typemill\Static\Helpers::addLogEntry('login: authcode wrong or outdated.'); + \Typemill\Static\Helpers::addLogEntry('login: verification code wrong or outdated.'); } - $this->c->get('flash')->addMessage('error', Translations::translate('The authcode was wrong or outdated, please start again.')); + $this->c->get('flash')->addMessage('error', Translations::translate('The verification was wrong or outdated, please start again.')); return $response->withHeader('Location', $this->routeParser->urlFor('auth.show'))->withStatus(302); } diff --git a/system/typemill/author/auth/authcode.twig b/system/typemill/author/auth/authcode.twig index f44f97f..90dc73f 100644 --- a/system/typemill/author/auth/authcode.twig +++ b/system/typemill/author/auth/authcode.twig @@ -1,6 +1,6 @@ {% extends 'layouts/layoutAuth.twig' %} -{% block title %}Login Authentication Code{% endblock %} +{% block title %}Login Verification Code{% endblock %} {% block content %} @@ -9,9 +9,9 @@
-

Authentication Code

+

Login Verification Code

-

{{ translate('Enter the authentication code from your email:') }} +

{{ translate('Enter the verification code from your email:') }}

diff --git a/system/typemill/settings/system.yaml b/system/typemill/settings/system.yaml index 46e215e..3f06009 100644 --- a/system/typemill/settings/system.yaml +++ b/system/typemill/settings/system.yaml @@ -210,9 +210,9 @@ fieldsetsecurity: checkboxlabel: 'Track spam and suspicious actions in a logfile' authcode: type: checkbox - label: 'Authentication code (recommended)' - checkboxlabel: 'Send a 5-digit authentication code by email to confirm login.' - description: 'Please test this with your account first. If you do not get an email, make sure you have ftp-access to the server to disable the feature in the settings.yaml manually. The authentication code will be valid for 5 minutes. Be aware that device fingerprints will be stored in the user accounts. Make sure this complies with privacy legislation in your country.' + label: 'Login Verification (recommended)' + checkboxlabel: 'Verify your login with a 5-digit code send by email.' + description: 'Please test this with your account. If you do not get an email, make sure you have ftp-access to disable the feature in the settings.yaml manually. The verification code will be valid for 5 minutes. Be aware that device fingerprints will be stored in the user accounts. Make sure this complies with privacy legislation in your country.' authcaptcha: type: radio label: 'Use captcha in authentication forms'