mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
During LDAP sync, we would call AddTeamMember which had a read-after-write issue where we would create a team member but then immediately after that query the team member. The same pattern was found in: AddTeamMember AddTeamMembers AddTeamMemberByToken To fix this, we just return the inserted team member from AddUserToTeam and use that instead of query GetTeamMember again. ```release-note NONE ``` https://mattermost.atlassian.net/browse/MM-33913 Co-authored-by: Mattermod <mattermod@users.noreply.github.com>