mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
fix errors to user picker: add placeholder and allow empty
This commit is contained in:
@@ -50,6 +50,10 @@ class UserCircleConsistencyValidator extends ConstraintValidator
|
||||
/* @var $user \Chill\MainBundle\Entity\User */
|
||||
$user = \call_user_func([$value, $constraint->getUserFunction ]);
|
||||
|
||||
if ($user === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (FALSE === $this->autorizationHelper->userHasAccess($user, $value, $constraint->role)) {
|
||||
$this->context
|
||||
->buildViolation($constraint->message)
|
||||
|
Reference in New Issue
Block a user