0

We have a field on the user that I just need to hide one field from. This user object may be loaded from an API service endpoint or just in a regular login. Is there a hook I can use to obfuscate the field? Or something in the admin panel I can do?

7
  • Can you be more specific? Is this a content type that you have created or is this the default users profile page Eg : mywebsite.com/user/userid Commented Dec 2, 2019 at 4:15
  • Its not a created content type, It should be the default user object. It is not the default page though. Commented Dec 2, 2019 at 4:17
  • If its the default page you can just easily add or remove fields from the configuration page. admin/config/people/accounts. Or check this link for the user related hooks. api.drupal.org/api/drupal/core%21modules%21user%21user.api.php/… Commented Dec 2, 2019 at 4:22
  • I can't provide a specific page because I am trying to write something that will generally prevent this field from ever being sent to any client. So whenever user data is loaded. Commented Dec 2, 2019 at 4:26
  • The default page wont be adequate Commented Dec 2, 2019 at 4:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.