By idebr on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
Before:
The user account form displays the 'Email address' field regardless of entity field access.
After:
The user account form now applies entity field access to the 'Email address' field in line with other user account form fields. As a result, it is now possible to forbid accessing the 'Email address' field using hook_entity_field_access():
if ($items && $items->getEntity()->getEntityTypeId() === 'user' && $field_definition->getName() === 'mail' && $operation == 'edit') {
return AccessResult::forbidden();
}
Impacts:
Module developers