0
1
Fork 0
hedera-web-mindshore/rest/core/set-password.php

25 lines
426 B
PHP
Raw Normal View History

2016-10-27 11:22:04 +00:00
<?php
include __DIR__.'/account.php';
/**
* Sets the user password.
**/
2018-05-23 10:14:20 +00:00
class SetPassword extends Vn\Web\JsonRequest {
2016-10-27 11:22:04 +00:00
const PARAMS = [
'setUser'
,'setPassword'
];
2018-05-23 10:14:20 +00:00
function run($db) {
2016-10-27 11:22:04 +00:00
$setUser = $_REQUEST['setUser'];
$setPassword = $_REQUEST['setPassword'];
2018-05-23 10:14:20 +00:00
$db->query('CALL account.userSetPassword(#, #)',
2016-10-27 11:22:04 +00:00
[$setUser, $setPassword]);
2018-05-23 10:14:20 +00:00
Account::sync($db, $setUser, $setPassword);
2016-10-27 11:22:04 +00:00
return TRUE;
}
}