12 lines
305 B
PHP
12 lines
305 B
PHP
<?php declare(strict_types=1);
|
|
|
|
checkPasswordFormat($_POST['new-password']);
|
|
|
|
if (checkPassword($_SESSION['id'], $_POST['current-password']) !== true)
|
|
output(403, _('Wrong current password.'));
|
|
|
|
rateLimit();
|
|
|
|
changePassword($_SESSION['id'], $_POST['new-password']);
|
|
|
|
output(200, _('Password updated.'));
|