@@ -14,9 +14,14 @@ class VisitorRepositoryQuery extends AbstractRepositoryQuery | |||
public function filterByCookie(string $cookie = null) | |||
{ | |||
return $this | |||
if(is_null($cookie)) { | |||
return $this->andWhere('.cookie IS NULL'); | |||
} | |||
else { | |||
return $this | |||
->andWhere('.cookie LIKE :cookie') | |||
->setParameter('cookie', $cookie); | |||
} | |||
} | |||
public function filterByLastAccess(\DateTime $lastAccess) |