fix errors to user picker: add placeholder and allow empty

This commit is contained in:
2018-05-08 22:56:03 +02:00
parent d684851f36
commit 6f73c9ee09
2 changed files with 5 additions and 1 deletions

View File

@@ -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)