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