From 7df0e45375aa12a821bb6b5467f74632a1b8cf82 Mon Sep 17 00:00:00 2001 From: Arlina Espinoza Rhoton Date: Tue, 12 May 2020 17:12:39 -0700 Subject: [PATCH] [#396] Add a target bundle to first and last name user fields. (#407) --- apigee_edge.module | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apigee_edge.module b/apigee_edge.module index a1bb4409..f491f919 100644 --- a/apigee_edge.module +++ b/apigee_edge.module @@ -313,6 +313,13 @@ function apigee_edge_entity_base_field_info_alter(&$fields, EntityTypeInterface $mail = $fields['mail']; $mail->setRequired(TRUE); $mail->addConstraint('DeveloperMailUnique'); + + // Add a bundle to these fields to allow other modules to display them + // as configurable (fields added through the UI or configuration do have a + // target bundle set). + // @see https://github.com/apigee/apigee-edge-drupal/issues/396 + $fields['first_name']->setTargetBundle('user'); + $fields['last_name']->setTargetBundle('user'); } }