This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add ability for password auth modules to modify user profile and threepid information #7734
Labels
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Z-Help-Wanted
We know exactly how to fix this issue, and would be grateful for any contribution
z-p3
(Deprecated Label)
ma1sd is currently trying to eliminate their need to reach into Synapse's guts and pull out the datastore object to achieve some simple tasks such as modifying user displayname/threepids during login. We've dissuaded them from doing this without providing an alternative.
This would involve adding the following abilities to password auth providers in the ModuleApi:
Recommended implementation is to add a method to
ModuleApi
which, given a fully qualified user ID (@alice:example.com
), allows you to set profile information such as displayname and threepids.ma1sd also includes functionality of replacing the user's existing threepids. This could be achieved by either adding an option to the above-mentioned method, which would replace whatever the user's current threepids are, or adding two more methods: one to get user threepids, and another to delete them individually. I'm willing to discuss which may be more useful generally.
It should be noted that ModuleApi.register_user method allows for setting displyname on register (but what if we want to do it on login?) and allows you to set emails for the user, but not phone numbers.
Implementations must remain backwards compatible.
The text was updated successfully, but these errors were encountered: