Skip to content

Commit 7df0e45

Browse files
[#396] Add a target bundle to first and last name user fields. (#407)
1 parent 2d7609d commit 7df0e45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apigee_edge.module

+7
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ function apigee_edge_entity_base_field_info_alter(&$fields, EntityTypeInterface
313313
$mail = $fields['mail'];
314314
$mail->setRequired(TRUE);
315315
$mail->addConstraint('DeveloperMailUnique');
316+
317+
// Add a bundle to these fields to allow other modules to display them
318+
// as configurable (fields added through the UI or configuration do have a
319+
// target bundle set).
320+
// @see https://github.com/apigee/apigee-edge-drupal/issues/396
321+
$fields['first_name']->setTargetBundle('user');
322+
$fields['last_name']->setTargetBundle('user');
316323
}
317324
}
318325

0 commit comments

Comments
 (0)