From 9ad2b017e235e26f0d7fee26e2fc9dd532dd8629 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 7 May 2021 08:15:06 +0000 Subject: register: fix language issue and add additional info to the infobox if email verification is configured --- Zotlabs/Module/Regate.php | 8 ++++++-- Zotlabs/Module/Register.php | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php index 155f818ef..15bc1da38 100644 --- a/Zotlabs/Module/Regate.php +++ b/Zotlabs/Module/Regate.php @@ -325,7 +325,7 @@ class Regate extends \Zotlabs\Web\Controller { $r = $r[0]; // provide a button in case - $resend = ($r['reg_didx'] == 'e') ? t('Resend') : false; + $resend = (($r['reg_didx'] == 'e') ? t('Resend email') : ''); // is still only instance admins intervention required? if ($r['reg_flags'] == ACCOUNT_PENDING) { @@ -373,6 +373,7 @@ class Regate extends \Zotlabs\Web\Controller { '$form_security_token' => get_form_security_token("regate"), '$title' => t('Registration verification'), '$desc' => t('Please enter your verification token for ID'), + '$email_extra' => (($didx === 'e') ? t('Please check your email!') : ''), '$id' => $did2, // we might consider to not provide $pin if a registration delay is configured // and the pin turns out to be readable by bots @@ -399,6 +400,8 @@ class Regate extends \Zotlabs\Web\Controller { return $o; } + $email_extra = (($didx === 'e') ? t('Please check your email!') : ''); + $o = replace_macros(get_markup_template('regate_pre.tpl'), [ '$title' => t('Registration verification'), '$now' => $nowfmt, @@ -406,7 +409,8 @@ class Regate extends \Zotlabs\Web\Controller { '$countdown' => datetime_convert('UTC', 'UTC', $r['reg_startup'], 'c'), '$strings' => [ t('Hold on, you can start verification in'), - t('You will require the verification token for ID') + t('You will require the verification token for ID'), + $email_extra ] ]); } diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index ecdcd90dd..683fcdc36 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -322,7 +322,7 @@ class Register extends Controller { $did2 = $email; $didx = 'e'; - push_lang(($reg['lang']) ? $reg['lang'] : 'en'); + push_lang(($reg['lang']) ? $reg['lang'] : App::$language); $reonar['from'] = get_config('system', 'from_email'); $reonar['to'] = $email; $reonar['subject'] = sprintf( t('Registration confirmation for %s'), get_config('system','sitename')); @@ -375,7 +375,7 @@ class Register extends Controller { dbesc($regexpire), dbesc($email), dbesc($password), - dbesc(substr(get_best_language(),0,2)), + dbesc(App::$language), dbesc($ip), dbesc(json_encode($reonar)) ); -- cgit v1.2.3