summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2025-05-20 14:52:09 +0200
committerSimon Rettberg2025-05-20 14:52:09 +0200
commitcaf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f (patch)
tree08f2b91ddef2b8a49821f42315c571d3135fd39e /inc
parent[eventlog] Don't use "smart"/relative time in events (diff)
downloadslx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.tar.gz
slx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.tar.xz
slx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.zip
[inc/User] Fix types
Diffstat (limited to 'inc')
-rw-r--r--inc/user.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index dd94ab71..0bb345c3 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -16,10 +16,10 @@ class User
return self::$user !== false;
}
- public static function getId()
+ public static function getId(): ?int
{
if (!self::isLoggedIn())
- return false;
+ return null;
return self::$user['userid'];
}
@@ -140,7 +140,7 @@ class User
return false;
}
- public static function testPassword(string $userid, string $password): bool
+ public static function testPassword(int $userid, string $password): bool
{
$ret = Database::queryFirst('SELECT passwd FROM user WHERE userid = :userid LIMIT 1', compact('userid'));
if ($ret === false)