I run discourse for university courses, and the custom user field would be the student number. A theme component seems like an OK stopgap solution, but making a custom field completely invisible to anything but staff or system API would be cleaner.
I think user fields are only shown to users when they are editable. So if you hide it on sign up and disable editing (and showing and searching) the field should be hidden for the user.
Configuration of the user field with all options disabled
Have a look at Discourse User Notes, a plugin now included in core. It’s meant for staff to internally share notes about users. (Loves cats – Golfs with the CEO – etc.)
@copymonopoly did the suggestions from Moin and Toddz help you resolve your issue? FWIW, we here on meta make very active use of user notes to share information amongst staff about our members. It works well (arguably better than custom user fields) because notes are right at your fingertips:
You can also access user notes via data explorer and likely also add/access them via the API.
And they have to do with who can access which records via the API:
Interestingly, the fields above don’t seem to select from available user custom fields, but take any text input – so you’d have to enter the field names preciselyread this doc carefully.
I think what would be would be having a custom field lookup for those admin settings that works in a similar way to the one in the ‘add user to group through User Custom Field’ Automation:
Thanks a lot for the suggestion!
Originally, I was planning to use custom user fields because I wanted to write a small component that displays specific information I add for each user. So I hadn’t really considered the Discourse User Notes core plugin.
But it does sound like User Notes might be able to achieve something similar, and it could be a helpful approach. I really appreciate the recommendation — I’m currently looking into it!