$username, 'password' => self::hashPassword($password), 'remote' => $remote, 'use_cns' => $useCns, ]); } public static function list(): array { return self::select('users', ['id', 'username', 'remote', 'use_cns'], []); } public static function token(string $username): ?string { $rows = self::select('users', ['id'], ['username' => $username]); if (empty($rows)) { return null; } $user = new User($rows[0]['id'], $username); return $user->getToken('http://localhost/callback'); } }