diff options
author | Mario <mario@mariovavti.com> | 2021-06-04 07:45:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-04 07:45:33 +0000 |
commit | e44bf42c646c018e00e8f0a2895a6c29522361a6 (patch) | |
tree | a9c9c5fcf52188caaa36ab57eadda48129fee181 /boot.php | |
parent | 3d1684fa942812e2d6f053cbfb6de9fdc00ea79c (diff) | |
download | volse-hubzilla-e44bf42c646c018e00e8f0a2895a6c29522361a6.tar.gz volse-hubzilla-e44bf42c646c018e00e8f0a2895a6c29522361a6.tar.bz2 volse-hubzilla-e44bf42c646c018e00e8f0a2895a6c29522361a6.zip |
fix login name label for the case when system.verify_email is disabled
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1710,21 +1710,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 |