Hotfix: restore user password
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
This commit is contained in:
parent
28876ad819
commit
59f446a824
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.408.23) stable; urgency=low
|
hedera-web (1.408.24) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.408.23",
|
"version": "1.408.24",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -14,7 +14,6 @@ class RestorePassword extends Vn\Web\JsonRequest {
|
||||||
|
|
||||||
$db->query('CALL account.myUser_restorePassword(#, #)',
|
$db->query('CALL account.myUser_restorePassword(#, #)',
|
||||||
[$verificationToken, $newPassword]);
|
[$verificationToken, $newPassword]);
|
||||||
Account::sync($db, $_SESSION['user'], $newPassword);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue