diff options
author | Mario <mario@mariovavti.com> | 2021-06-04 07:43:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-04 07:43:23 +0000 |
commit | d882bad706542eb1e64c24567b8bf112f6cebb89 (patch) | |
tree | 46410934b7c7688fc2f8cc020939a37cb61b4926 | |
parent | e5c8273f7284fe065e88b8d7ddac2ea55964f3f0 (diff) | |
download | volse-hubzilla-d882bad706542eb1e64c24567b8bf112f6cebb89.tar.gz volse-hubzilla-d882bad706542eb1e64c24567b8bf112f6cebb89.tar.bz2 volse-hubzilla-d882bad706542eb1e64c24567b8bf112f6cebb89.zip |
fix login name label for the case when system.verify_email is disabled
-rw-r--r-- | Zotlabs/Daemon/Directory.php | 2 | ||||
-rw-r--r-- | boot.php | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/Zotlabs/Daemon/Directory.php b/Zotlabs/Daemon/Directory.php index 1f307b273..35d184206 100644 --- a/Zotlabs/Daemon/Directory.php +++ b/Zotlabs/Daemon/Directory.php @@ -74,7 +74,7 @@ class Directory { * the directory packet. That means we'll try again on the next poll run. */ - $hash = random_string(); + $hash = new_uuid(); Queue::insert(array( 'hash' => $hash, @@ -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 |