Skip to content

Email Address Change Issue - Profile and Settings show Old Email Address #688

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

Open
jmgasper opened this issue Jul 20, 2022 · 0 comments
Open

Comments

@jmgasper
Copy link
Collaborator

Problem

A user is allowed to change their email address in their Topcoder profile. When that happens, we are not updating the email registered against their account in Vanilla the next time they visit the forums.

Untitled.mov

Expectation

If a user changes their email address on their Topcoder profile, the next time they visit https://discussions.topcoder.com, their account should be updated with the new email address.

Solution

The current account sync happens in the forums plugin. When a user logs in, we check if we already have a user account for them here:

https://github.com/topcoder-platform/forums-plugins/blob/2b516b54f09de98ad3a68988a73df2297cb54fca/Topcoder/class.topcoder.plugin.php#L459

If we don't, then we create the user account, with their email address

If we do, then we use the user account, without updating it, other than ensuring that the roles are synced:

https://github.com/topcoder-platform/forums-plugins/blob/2b516b54f09de98ad3a68988a73df2297cb54fca/Topcoder/class.topcoder.plugin.php#L507

https://github.com/topcoder-platform/forums-plugins/blob/2b516b54f09de98ad3a68988a73df2297cb54fca/Topcoder/class.topcoder.plugin.php#L641

To fix the email issue, we should add a syncTopcoderEmail function, similar to syncTopcoderRoles that syncs the email address from the JWT to the user model, ensuring that the email address is kept in-sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant