adasd
This commit is contained in:
@@ -13,12 +13,21 @@ $token = trim((string) ($_GET['token'] ?? $_POST['token'] ?? ''));
|
||||
$record = $service->validate($token);
|
||||
$message = null;
|
||||
$error = null;
|
||||
$form = [
|
||||
'password' => '',
|
||||
'password_confirm' => '',
|
||||
];
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$form = [
|
||||
'password' => (string) ($_POST['password'] ?? ''),
|
||||
'password_confirm' => (string) ($_POST['password_confirm'] ?? ''),
|
||||
];
|
||||
|
||||
$result = $service->complete(
|
||||
$token,
|
||||
(string) ($_POST['password'] ?? ''),
|
||||
(string) ($_POST['password_confirm'] ?? '')
|
||||
$form['password'],
|
||||
$form['password_confirm']
|
||||
);
|
||||
|
||||
if ($result['success'] ?? false) {
|
||||
@@ -58,12 +67,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<input type="hidden" name="token" value="<?= htmlspecialchars($token, ENT_QUOTES) ?>">
|
||||
<label class="login-field">
|
||||
<span>Neues Passwort</span>
|
||||
<input type="password" name="password" required>
|
||||
<input type="password" name="password" value="<?= htmlspecialchars($form['password'], ENT_QUOTES) ?>" required>
|
||||
</label>
|
||||
|
||||
<label class="login-field">
|
||||
<span>Neues Passwort wiederholen</span>
|
||||
<input type="password" name="password_confirm" required>
|
||||
<input type="password" name="password_confirm" value="<?= htmlspecialchars($form['password_confirm'], ENT_QUOTES) ?>" required>
|
||||
</label>
|
||||
|
||||
<div class="login-actions">
|
||||
|
||||
Reference in New Issue
Block a user