Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was 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

@anoadragon453

Description

@anoadragon453

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.Z-Help-WantedWe know exactly how to fix this issue, and would be grateful for any contributionz-p3(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions