From 7cf7e7f2380165ebc553de2ab34d10d49d685b32 Mon Sep 17 00:00:00 2001 From: Rajat Varyani <37879062+RajatVaryani@users.noreply.github.com> Date: Fri, 25 Oct 2019 14:13:13 +0530 Subject: [PATCH] [MM-18871] Update session in app instance in app layer (#12540) --- api4/user.go | 2 -- app/login.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api4/user.go b/api4/user.go index 315c36e970..81fda670f5 100644 --- a/api4/user.go +++ b/api4/user.go @@ -1422,8 +1422,6 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) { user.TermsOfServiceCreateAt = userTermsOfService.CreateAt } - c.App.Session = *session - user.Sanitize(map[string]bool{}) w.Write([]byte(user.ToJson())) diff --git a/app/login.go b/app/login.go index 8b4a7fcaf7..31f1126fdd 100644 --- a/app/login.go +++ b/app/login.go @@ -162,6 +162,7 @@ func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, } w.Header().Set(model.HEADER_TOKEN, session.Token) + a.Session = *session if pluginsEnvironment := a.GetPluginsEnvironment(); pluginsEnvironment != nil { a.Srv.Go(func() {