mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
upload and tests
This commit is contained in:
parent
05f48fd0a0
commit
03d3acebf5
21 changed files with 1026 additions and 152 deletions
|
|
@ -92,4 +92,15 @@ class UserProvider extends BaseProvider {
|
|||
$row = $query->execute()->fetch();
|
||||
return $row ? User::fromRow($row) : null;
|
||||
}
|
||||
|
||||
public function getUserId(string $steamId) {
|
||||
$existing = $this->get($steamId);
|
||||
if ($existing) {
|
||||
return $existing->getId();
|
||||
}
|
||||
|
||||
$this->store(new \SteamId($steamId));
|
||||
|
||||
return $this->get($steamId)->getId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue