hedera-web/rest/core/set-password.php

27 lines
431 B
PHP
Raw Normal View History

2016-10-27 11:22:04 +00:00
<?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'];
$db->query ('CALL account.userSetPassword (#, #)',
[$setUser, $setPassword]);
2017-05-02 12:33:48 +00:00
Account::sync ($db, $setUser, $setPassword);
2016-10-27 11:22:04 +00:00
return TRUE;
}
}