According to https://github.com/plone/plone.app.users, profile fields are extended via plone.schemaeditor and it can be set via plone.supermodel xml format. Permissions are set in xml via the sample code below. I think it is worth a try.
For the record I tested the trick but without the ZMI, by using edit as Xml in the Fields management of the Plone Control Panel. It worked but only half the time; now you see it, now you don't. After a few minutes of bewilderment i restarted both Zeo clients and everything was working fine, seems not is perfect in Plone Xml editor, but nice trick indeed @h2o ! Actually if there is only one field hidden in a tab the tab itself is not displayed, so it seems to work really well.
Slightly related: Reordering fields with the UI is sometimes not working (both with members, dexterity content types and collective.easyform, then you can use the same approach (or for dexterity/easyform TTW: edit the xml-schema TTW)
I have a local setup on my PC, I changed the xml and added a new field as mentioned in the link, but that change is not getting reflected, my newly added field is not visible on the Member Fields page,
I even rebuild using the following command, but of no help.
I added security:write-permission and form:omitted to a userschema.xml field but neither work for me. Does anyone have this working on plone 5.2.4 py3 site?
My site does not exist anymore, so I am not sure where I have the code. That said: Do you see the 'omitted' when you export the user schema xml (from the site you added it), and did you restart (I remember I had to restart before it worked)
Hi @espenmn , yes I did restart. When I export the userschema the permissions and omitted params are missing. I changed the title to test and that is exported correctly.
I just discovered a workaround if it is enough to hide the field. This will likely not work via the schema editor UI since the "users:forms" field is required. But if you use a userschema.xml you can hide a custom field by setting an empty "users:forms" attribute. For example:
The field will not appear in the registration and profile form for the user. However, all fields will be rendered for an admin account looking at a user's profile.