fix: [user add] fixed bug with metafields on new users causing an exception

dependabot/npm_and_yarn/webroot/theme/braces-3.0.3
iglocska 2024-06-13 07:20:00 +02:00
parent 344a535467
commit fd9da66a9e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class UsersTable extends AppTable
if (!empty($entity->meta_fields)) { if (!empty($entity->meta_fields)) {
foreach ($entity['meta_fields'] as $metaField) { foreach ($entity['meta_fields'] as $metaField) {
if ($metaField['field'] === $permission_name) { if ($metaField['field'] === $permission_name) {
if (!$entity->new) { if (!$entity->isNew()) {
$conditions = [ $conditions = [
'field' => $permission_name, 'scope' => 'user', 'parent_id' => $entity->id 'field' => $permission_name, 'scope' => 'user', 'parent_id' => $entity->id
]; ];