- πΊπΈUnited States jasonawant New Orleans, USA
I thought I'd add some notes as I dug into this a bit today.
When programmatically retrieving a user's email address via $user->getEmail() method, it does not respect the Drupal core user 'view user email addresses' permission here or any implementation by this module. Moreover, using entity api to retrieve field values bypasses access checking, including that of this module.
However, if you were to use field access checking via
$user->mail->access('view');
, this module could impact its access grants.EntityAccessControlHandler.php::fieldAccess() invokes UserAccessControlHandler::checkFieldAccess() β here and then later EntityAccessControlHandler.php::fieldAccess() here would invoke field_permissions_entity_field_access()
However, I don't think there is a way to configure field permissions for user account mail property. The proposed solution would be a deviation from field permission's module configuration UI for fields.
- πΊπΈUnited States DamienMcKenna NH, USA
As far as this module is concerned, maybe this should just be documented as a "known issue" or "known limitation"? It could be added to the README.md file, a documentation page of "known limitations", maybe even mentioned in hook_help.