Hide profile fields in personal settings
Deactivate profile
If the public profile is not used, then it's possible to deactivate it and hide the fields for Organisation, Role, Headline and About.
Via occ:
php occ config:system:set --type boolean --value false profile.enabled
Or add the following line to your config.php:
'profile.enabled' => false,
Hide profile fields with customcss app
The profile fields are only hidden, the functionality is still there.
Install and enable the Custom CSS (https://apps.nextcloud.com/apps/theming_customcss) app. Open Administration and go to Theming. You will see a new section "Custom CSS".
The approach is to find the css selectors for the profile fields and write a rule to hide those.
Example to hide Phone Number and Location:
#personal-settings :nth-child(7),
#personal-settings :nth-child(8) {
display: none;
}
Selectors for Nextloud 30, 29, 28 and 27.
| Field | Selector |
|---|---|
| Full name | #personal-settings :nth-child(5) |
| #personal-settings :nth-child(6) | |
| Phone number | #personal-settings :nth-child(7) |
| Location | #personal-settings :nth-child(8) |
| Language | #personal-settings :nth-child(9) |
| Locale | #personal-settings :nth-child(10) |
| Website | #personal-settings :nth-child(11) |
| X (formerly Twitter) | #personal-settings :nth-child(12) |
| Fediverse (e.g. Mastodon) | #personal-settings :nth-child(13) |
| Organisation | #personal-settings :nth-child(14) |
| Role | #personal-settings :nth-child(15) |
| Headline | #personal-settings :nth-child(16) |
| About | #personal-settings :nth-child(17) |
Subscriber exclusive content
A Nextcloud Enterprise Subscription provides unlimited access to our knowledge base articles and direct access to Nextcloud engineers.