summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
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: