diff --git a/src/models/Session.php b/src/models/Session.php index fd86ccd7..4ca6b62c 100644 --- a/src/models/Session.php +++ b/src/models/Session.php @@ -111,7 +111,7 @@ private static function sessionFromRow(Map $row): Session { ): Awaitable { $db = await self::genDb(); await $db->queryf( - 'INSERT INTO sessions (cookie, data, created_ts, last_access_ts, team_id, last_page_access) VALUES (%s, %s, NOW(), NOW(), 1, %s)', + 'INSERT INTO sessions (cookie, data, created_ts, last_access_ts, team_id, last_page_access) VALUES (%s, %s, NOW(), NOW(), 0, %s)', $cookie, $data, Router::getRequestedPage(), diff --git a/tests/models/SessionTest.php b/tests/models/SessionTest.php index 1411e801..6f969059 100644 --- a/tests/models/SessionTest.php +++ b/tests/models/SessionTest.php @@ -22,6 +22,6 @@ public function testCreate(): void { $this->assertEquals(2, $a->getId()); $this->assertEquals('cookie2', $a->getCookie()); $this->assertEquals('data2', $a->getData()); - $this->assertEquals(1, $a->getTeamId()); + $this->assertEquals(0, $a->getTeamId()); } }