2022-12-20 20:17:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
checkPasswordFormat($_POST['new-password']);
|
|
|
|
|
|
|
|
if (checkPassword($_SESSION['id'], $_POST['current-password']) !== true)
|
2023-01-21 00:27:52 +00:00
|
|
|
output(403, _('Wrong current password.'));
|
2022-12-20 20:17:03 +00:00
|
|
|
|
|
|
|
changePassword($_SESSION['id'], $_POST['new-password']);
|
|
|
|
|
2023-01-21 00:27:52 +00:00
|
|
|
output(200, _('Password updated.'));
|