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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|