summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2018-03-22 19:46:30 +0200
committerGitHub <noreply@github.com>2018-03-22 19:46:30 +0200
commitc9e9484150fcc05ca12388c6db8b831c41f227eb (patch)
treeac083bdfbeb22a689984e0e20967e5362ecbf3f5 /api/user.go
parent6036ddad8598cc69511a259ffdafcce570653717 (diff)
downloadchat-c9e9484150fcc05ca12388c6db8b831c41f227eb.tar.gz
chat-c9e9484150fcc05ca12388c6db8b831c41f227eb.tar.bz2
chat-c9e9484150fcc05ca12388c6db8b831c41f227eb.zip
MM-9853 Fix Team invite does not carry through SAML login (#8495)
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/api/user.go b/api/user.go
index 14cc881dc..560d722a4 100644
--- a/api/user.go
+++ b/api/user.go
@@ -1170,7 +1170,11 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
teamId := relayProps["team_id"]
if len(teamId) > 0 {
c.App.Go(func() {
- c.App.AddDirectChannels(teamId, user)
+ if err := c.App.AddUserToTeamByTeamId(teamId, user); err != nil {
+ l4g.Error(err.Error())
+ } else {
+ c.App.AddDirectChannels(teamId, user)
+ }
})
}
case model.OAUTH_ACTION_EMAIL_TO_SSO: