mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-04 06:25:22 +01:00
Prevent a user from lock itself out from the user system.
This commit is contained in:
@@ -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
|
||||
// */
|
||||
|
||||
Reference in New Issue
Block a user