[Feature Request] Use unique user IDs internally

Use unique user IDs internally to identify users. With this concept you can change everything like name, e-mail, etc.
For LDAP users, sync there unique ID from the external source, too. With this ID (like SID from the Active Directory) you can always match them even after changes where made in the external DB.

I suggest to create the issue on github.

If you use LDAP, the recommend way is to use userPrincipalName to identify a user. The userPrincipalName will not change when you change a user’s email. It is documented in LDAP/AD Integration - Seafile Admin Manual

If you use email to identify a user already, you can use this API to migrate a old user’s libraries and sharing information to a new user: https://download.seafile.com/published/web-api/v2.1-admin/accounts.md#user-content-Migrate%20Account

The API is available since version 8.0

This is the best solution we can offer so far to be compatible with existing Seafile servers.