summaryrefslogtreecommitdiffstats
path: root/api4/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/user.go')
-rw-r--r--api4/user.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/api4/user.go b/api4/user.go
index 16b7f79a9..4f4185958 100644
--- a/api4/user.go
+++ b/api4/user.go
@@ -683,10 +683,18 @@ func updateUserActive(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if ruser, err := c.App.UpdateNonSSOUserActive(c.Params.UserId, active); err != nil {
+ var user *model.User
+ var err *model.AppError
+
+ if user, err = c.App.GetUser(c.Params.UserId); err != nil {
+ c.Err = err
+ return
+ }
+
+ if _, err := c.App.UpdateActive(user, active); err != nil {
c.Err = err
} else {
- c.LogAuditWithUserId(ruser.Id, fmt.Sprintf("active=%v", active))
+ c.LogAuditWithUserId(user.Id, fmt.Sprintf("active=%v", active))
ReturnStatusOK(w)
}
}