We would like to add several custom attributes to contacts.
For example linking a contact with the userid of an user, so he could edit his own contact details directly in his profile (But he won’t be allowed to change other users contact details).
How difficult would that be?
We’d need to change the templates for contact details and for user profiles, which shouldn’t be to difficult I guess.
What about storing the new attributes?
Those new attributes wouldn’t necessarily need to be synchronized over carddav (it would be only a nice to have).
And the whole thing in a way, that it would be easy to updated it when new nextcloud versions come out.
(if anybody would be interested in the work, we’d also publish it on github).
We Would be interested too in adding custom fields to contacts.
I tried adding it directly in a one-user vcard file, but that field is not shown in nextcloud-contacts after the import.
Is there a working mechanism for that task?
It would be nice if it was possible to have that custom fields synchronised with at least cardbook in thunderbird.
I guess there should be somewhere a class or an array which defines which attributes nextcloud knows.
Unfortunately the template for contact editing is the usual mess where you have no idea where the different variables are coming from without looking further into the whole system. (It doesn’t help that it seems that some of the functionality for contacts is in the contacts app, and some is in the core).
I should be able to tell you more, once I start implementing the whole thing.
DISCLAIMER: The Contacts app may have changed since I maintained it.
Storing the attribute for linking it to a userprofile in the VCard is not recommended. All attributes are saved losslessly when importing or adding a contact, so a user could create a specially crafted VCard and get access to other contacts in the database table.
An other way would be to somehow expose the actual ID in the database (of course without exposing it to the user) and link contact and user profile that way.
Hi! Is there anything new on this? We’re thinking about switching to nextcloud, but we use userfields for quite a lot of things and we really need to keep that data. Thanks!
However, it obviously does not fullfil that purpose. Potentially, it could be close if the user stored pure JSON in their notes, but that’s unreasonable.