Skip to content
Snippets Groups Projects
Commit 55c3f4b3 authored by xamgore's avatar xamgore
Browse files

Documentation improvements

parent f1d44df9
Branches
Tags
No related merge requests found
......@@ -63,19 +63,28 @@ class Model_Account extends Model
->execute()[0];
}
/**
* @param $accountID
* @param $newPassword
* @return bool true, if password was changed
*/
public static function changePassword($accountID, $newPassword) {
$sql = 'SELECT `ChangeAccountData`(:account, :value, "password") AS Num';
return DB::query(Database::SELECT, $sql)
return (bool) DB::query(Database::SELECT, $sql)
->parameters([
':account' => $accountID,
':value' => $newPassword,
])->execute()->get('Num');
}
/**
* @param $accountID
* @param $newLogin
* @return bool true, if login was changed
*/
public static function changeLogin($accountID, $newLogin) {
$sql = 'SELECT `ChangeAccountData`(:account, :value, "login") AS Num';
return DB::query(Database::SELECT, $sql)
return (bool) DB::query(Database::SELECT, $sql)
->parameters([
':account' => $accountID,
':value' => $newLogin,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment