added TOKEN for users,

added user*() method for API,
added check TOKEN for all methods in API
This commit is contained in:
2026-02-12 02:11:07 +01:00
parent 5b93cdd002
commit 2d96baa389
4 changed files with 326 additions and 72 deletions

View File

@ -107,6 +107,12 @@ class Maintenance extends \TPsoft\DBmodel\Maintenance
$this->dbver(7);
$dbver = 7;
}
if ($dbver == 7) {
$this->checkDBAdd('users', 'token', 'VARCHAR(255) DEFAULT NULL AFTER `password_hash`');
$this->checkDBAdd('users', 'token_expires', 'DATETIME DEFAULT NULL AFTER `token`');
$this->dbver(8);
$dbver = 8;
}
}
protected function settings(string $key, ?string $value = null): string|false