diff options
| author | Simon Rettberg | 2025-05-20 14:52:09 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-05-20 14:52:09 +0200 |
| commit | caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f (patch) | |
| tree | 08f2b91ddef2b8a49821f42315c571d3135fd39e /inc/user.inc.php | |
| parent | [eventlog] Don't use "smart"/relative time in events (diff) | |
| download | slx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.tar.gz slx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.tar.xz slx-admin-caf8eb8e69b74ee8e9e479a0aaff23b795c4fa3f.zip | |
[inc/User] Fix types
Diffstat (limited to 'inc/user.inc.php')
| -rw-r--r-- | inc/user.inc.php | 6 |
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) |
