mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Prevent a user from lock itself out from the user system.
This commit is contained in:
parent
856e20586f
commit
90d449ea22
6 changed files with 164 additions and 1 deletions
|
@ -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
|
||||
// */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue