1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00
This commit is contained in:
Robin Appelman 2019-01-26 21:17:23 +01:00
commit 857f106739
2 changed files with 6 additions and 6 deletions

View file

@ -23,7 +23,7 @@ class AuthProvider extends BaseProvider {
}
public function setUser(string $token, \SteamId $steamid, string $key) {
\apcu_store($token, [
apcu_store($token, [
'name' => $steamid->getNickname(),
'steamid' => $steamid->getSteamId64(),
'key' => $key,
@ -32,12 +32,12 @@ class AuthProvider extends BaseProvider {
public function getUser(string $token) {
$found = true;
$result = \apcu_fetch($token, $found);
$result = apcu_fetch($token, $found);
return $found ? $result : ['name' => null, 'steamid' => null, 'key' => null];
}
public function logout($token) {
\apcu_delete($token);
apcu_delete($token);
}
}