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