prevent email or username from being non-unique (#2730)
This commit is contained in:
@@ -82,6 +82,11 @@ class UserRepository extends EntityRepository implements UserLoaderInterface
|
||||
return parent::findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
public function findByUsername($username): ?User
|
||||
{
|
||||
return parent::findOneBy(['username' => $username]);
|
||||
}
|
||||
|
||||
public function countUser(?bool $enabled = null): int
|
||||
{
|
||||
if (null !== $enabled) {
|
||||
|
||||
Reference in New Issue
Block a user