diff options
| -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) |
