2016-10-27 11:22:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include __DIR__.'/account.php';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the user password.
|
2016-12-20 09:32:17 +00:00
|
|
|
*/
|
2016-10-27 11:22:04 +00:00
|
|
|
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]);
|
|
|
|
Account::sync ($db, $setUser, $setPassword, Account::PASS);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|