Fix and Enhancements
This commit is contained in:
@@ -79,6 +79,25 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyRole(string $role)
|
||||
{
|
||||
$this->qb->andWhere('u.roles LIKE :role')
|
||||
->setParameter('role', '%ROLE_' . strtoupper($role) . '%');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyActive()
|
||||
{
|
||||
$this->qb->andWhere('u.isDesactivated = 0');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyDesactivated()
|
||||
{
|
||||
$this->qb->andWhere('u.isDesactivated = 1');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function search(?string $search, bool $adminmode = false)
|
||||
{
|
||||
if (null === $search) {
|
||||
|
||||
Reference in New Issue
Block a user