fix: [user add] fixed bug with metafields on new users causing an exception
parent
344a535467
commit
fd9da66a9e
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue