Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for password auth modules to modify user profile and threepid information #7734

Open
matrixbot opened this issue Dec 17, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 17, 2023

This issue has been migrated from #7734.


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.

@matrixbot matrixbot changed the title Dummy issue Add ability for password auth modules to modify user profile and threepid information Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant