Skip to content
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

Open
anoadragon453 opened this issue Jun 22, 2020 · 2 comments
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)

Comments

@anoadragon453
Copy link
Member

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:

  • The ability to set/update a user's displayname
  • The ability to set (and optionally replace) the user's threepids

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.

@Half-Shot
Copy link
Collaborator

Would also like for the ability to set avatars too, but otherwise all of the above.

@clokep
Copy link
Member

clokep commented Aug 6, 2021

This is probably fairly similar to #10108, which did this for SSO -- we should try to be consistent with config options and such.

@erikjohnston erikjohnston added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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)
Projects
None yet
Development

No branches or pull requests

4 participants