0
1
Fork 0

Hotfix: restore user password

This commit is contained in:
Juan Ferrer 2022-11-04 15:15:16 +01:00
parent 28876ad819
commit 59f446a824
4 changed files with 2 additions and 31 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.408.23) stable; urgency=low
hedera-web (1.408.24) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.408.23",
"version": "1.408.24",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -14,7 +14,6 @@ class RestorePassword extends Vn\Web\JsonRequest {
$db->query('CALL account.myUser_restorePassword(#, #)',
[$verificationToken, $newPassword]);
Account::sync($db, $_SESSION['user'], $newPassword);
return TRUE;
}
}

View File

@ -1,28 +0,0 @@
<?php
include __DIR__.'/account.php';
/**
* Sets the user password.
**/
class SetPassword extends Vn\Web\JsonRequest {
const PARAMS = [
'setUser'
,'setPassword'
];
function run($db) {
$setUser = $_REQUEST['setUser'];
$setPassword = $_REQUEST['setPassword'];
$userId = $db->getValue(
'SELECT id FROM account.user WHERE `name` = #',
[$setUser]
);
$db->query('CALL account.user_setPassword(#, #)',
[$userId, $setPassword]);
Account::sync($db, $setUser, $setPassword);
return TRUE;
}
}