bpcurse / nextcloud-userexport

PHP script to export and filter lists (users, groups and groupfolders) using different Nextcloud APIs
The Unlicense
12 stars 3 forks source link

Allow secondary email address #67

Open adamshand opened 2 years ago

adamshand commented 2 years ago

Hello,

Again, thanks for the really great software. :-)

NextCloud allows multiple email addresses to be defined per-user. However, there doesn't seem to be any way to get access to additional email addresses from within NCUE.

It would be quite helpful to be able to generate emails to secondary email addresses as well.

Many thanks, Adam.

bpcurse commented 2 years ago

Thanks again :smile: Will check in the next days if the API response contains those user addresses. If yes they will be added to the generated lists.

It would be quite helpful to be able to generate emails to secondary email addresses as well.

I am not yet sure about the UI and what the user will probably want to do.

What do you propose should happen if both addresses are available? Simply add both of them to the email list and accept duplicate emails or some kind of warning like "Multiple email addresses were found for some users!" and an option to do something like "Add all email addresses to the list" or "Add only primary email addresses to the list"?

bpcurse commented 2 years ago

Update: Just checked the user metadata API and it returns additional (even multiple) email addresses as <additional_mail>. So this feature is technically feasible.

adamshand commented 2 years ago

What do you propose should happen if both addresses are available? Simply add both of them to the email list and accept duplicate emails or some kind of warning like "Multiple email addresses were found for some users!" and an option to do something like "Add all email addresses to the list" or "Add only primary email addresses to the list"?

I think that makes sense. By default only include primary email addresses, but have a tickbox to include all addresses.

Thanks! Adam.