1
0
Fork 0
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:
Robin Appelman 2017-04-10 00:58:50 +02:00
commit 03d3acebf5
21 changed files with 1026 additions and 152 deletions

View file

@ -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();
}
}