Prevent a user from lock itself out from the user system.

This commit is contained in:
Jan Böhmer 2019-09-11 18:50:23 +02:00
parent 856e20586f
commit 90d449ea22
6 changed files with 164 additions and 1 deletions

View file

@ -19,6 +19,17 @@ class UserRepository extends ServiceEntityRepository
parent::__construct($registry, User::class);
}
/**
* Returns the anonymous user
* @return User|null
*/
public function getAnonymousUser()
{
return $this->findOneBy([
'id' => User::ID_ANONYMOUS
]);
}
// /**
// * @return User[] Returns an array of User objects
// */