Skip to content

Commit

Permalink
[#396] Add a target bundle to first and last name user fields. (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlina-espinoza authored May 13, 2020
1 parent 2d7609d commit 7df0e45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apigee_edge.module
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

Expand Down

0 comments on commit 7df0e45

Please sign in to comment.