Stopping email address visibility in nextcloud contacts

November 7, 2020 - Reading time: ~1 minute

From here --> https://help.nextcloud.com/t/change-default-profile-privacy-settings-email-hidding/22647/2

Edit this file more less in the line 308: “NCrootFolder”/lib/private/Accounts/AccountManager.php

Where it says:
self::PROPERTY_EMAIL =>
[
‘value’ => $user->getEMailAddress(),
‘scope’ => self::VISIBILITY_CONTACTS_ONLY,
‘verified’ => self::NOT_VERIFIED,
],

It should say:
self::PROPERTY_EMAIL =>
[
‘value’ => $user->getEMailAddress(),
‘scope’ => self::VISIBILITY_PRIVATE,
‘verified’ => self::NOT_VERIFIED,
],

The problem is that the file might be overwrited in an update.

I think this should be private by default, or at least, configurable.

LazyCoderOZ

I am a Linux guy, been around for 20+ years using Linux as my daily driver.
This is my blog on my discoveries and notes so I don't forget how I have done things :)