diff options
Diffstat (limited to 'api4/user.go')
-rw-r--r-- | api4/user.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/api4/user.go b/api4/user.go index 8f8f08c75..20b035f1d 100644 --- a/api4/user.go +++ b/api4/user.go @@ -589,8 +589,13 @@ func patchUser(c *Context, w http.ResponseWriter, r *http.Request) { return } + ouser, err := c.App.GetUser(c.Params.UserId) + if err != nil { + c.SetInvalidParam("user_id") + return + } + if c.Session.IsOAuth && patch.Email != nil { - ouser, err := c.App.GetUser(c.Params.UserId) if err != nil { c.Err = err return @@ -607,6 +612,7 @@ func patchUser(c *Context, w http.ResponseWriter, r *http.Request) { c.Err = err return } else { + c.App.SetAutoResponderStatus(ruser, ouser.NotifyProps) c.LogAudit("") w.Write([]byte(ruser.ToJson())) } |