aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-04 07:45:33 +0000
committerMario <mario@mariovavti.com>2021-06-04 07:48:25 +0000
commit343f3059e6df65c4c97ca7ab359addeb5d0e1cf5 (patch)
tree5c1f6cb7dcb6b7061b1d4111e5a86d044bd0cd12
parentba22d3e9b6ef7042d7129c7715c81c668fcf79b3 (diff)
downloadvolse-hubzilla-343f3059e6df65c4c97ca7ab359addeb5d0e1cf5.tar.gz
volse-hubzilla-343f3059e6df65c4c97ca7ab359addeb5d0e1cf5.tar.bz2
volse-hubzilla-343f3059e6df65c4c97ca7ab359addeb5d0e1cf5.zip
fix login name label for the case when system.verify_email is disabled
(cherry picked from commit e44bf42c646c018e00e8f0a2895a6c29522361a6)
-rw-r--r--boot.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index 622784e9c..ec380992f 100644
--- a/boot.php
+++ b/boot.php
@@ -1709,21 +1709,24 @@ function login($register = false, $form_id = 'main-login', $hiddens = false, $lo
$_SESSION['login_return_url'] = App::$query_string;
}
- $o .= replace_macros($tpl,array(
+ $email_required = get_config('system', 'verify_email');
+ $lname_label = (($email_required) ? t('Email or nickname') : t('Nickname'));
+
+ $o .= replace_macros($tpl, [
'$dest_url' => $dest_url,
'$login_page' => $login_page,
'$logout' => t('Logout'),
'$login' => t('Login'),
'$remote_login' => t('Remote Authentication'),
'$form_id' => $form_id,
- '$lname' => array('username', t('Login/Email') , '', ''),
- '$lpassword' => array('password', t('Password'), '', ''),
- '$remember_me' => array((($login_page) ? 'remember' : 'remember_me'), t('Remember me'), '', '',array(t('No'),t('Yes'))),
+ '$lname' => ['username', $lname_label],
+ '$lpassword' => ['password', t('Password')],
+ '$remember_me' => [(($login_page) ? 'remember' : 'remember_me'), t('Remember me'), '', '', [t('No'),t('Yes')]],
'$hiddens' => $hiddens,
'$register' => $reg,
'$lostpass' => t('Forgot your password?'),
- '$lostlink' => t('Password Reset'),
- ));
+ '$lostlink' => (($email_required) ? t('Password Reset') : ''),
+ ]);
/**
* @hooks login_hook