Minor fixes

This commit is contained in:
Miraty 2023-03-18 18:38:27 +01:00
parent d41ac85b55
commit 80bef2ca8c
4 changed files with 8 additions and 6 deletions

View file

@ -291,7 +291,7 @@ msgstr "Anonyme"
#: view.php:44
#, php-format
msgid "This form won't be accepted because you need to %slog in%s first."
msgstr "Ce forumulaire ne sera pas accepté car il faut %sse connecter%s d'abord."
msgstr "Ce formulaire ne sera pas accepté car il faut %sse connecter%s d'abord."
#: view.php:51
#, php-format

View file

@ -93,7 +93,7 @@ $quota = ($_SESSION['type'] ?? '' === 'approved') ? CONF['ht']['user_quota_appro
</dd>
<dt><?= _('Username') ?></dt>
<dd>
<code><?= isset($_SESSION['display-username']) ? $_SESSION['display-username'] : '&lt;username&gt;'; ?></code>
<code><?= defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;' ?></code>
</dd>
<dt><?= _('Password') ?></dt>
<dd>

View file

@ -17,6 +17,9 @@ $username = hashUsername($auth_data['username']);
if (usernameExists($username) !== true)
deny();
if (!in_array('ht', explode(',', query('select', 'users', ['username' => $username], 'services')[0]), true))
deny();
$id = query('select', 'users', ['username' => $username], 'id')[0];
if (checkPassword($id, $auth_data['password']) !== true)
@ -36,4 +39,3 @@ echo '
}
';
http_response_code(200);