Browse Source

Visitor : optimisation filtre par cookie

develop
Guillaume Bourgeois 1 year ago
parent
commit
688da04593
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      Repository/User/VisitorRepositoryQuery.php

+ 6
- 1
Repository/User/VisitorRepositoryQuery.php View File



public function filterByCookie(string $cookie = null) 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') ->andWhere('.cookie LIKE :cookie')
->setParameter('cookie', $cookie); ->setParameter('cookie', $cookie);
}
} }


public function filterByLastAccess(\DateTime $lastAccess) public function filterByLastAccess(\DateTime $lastAccess)

Loading…
Cancel
Save