forked from verdnatura/hedera-web
Hotfix: restore user password
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.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.408.23",
|
||||
"version": "1.408.24",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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