summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/user.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/model/user.go b/model/user.go
index b0c30619c..8917658df 100644
--- a/model/user.go
+++ b/model/user.go
@@ -250,18 +250,8 @@ func (u *User) ClearNonProfileFields() {
u.FailedAttempts = 0
}
-func (u *User) SanitizeProfile(isSystemAdmin, pwdupdate, fullname, email bool) {
- options := map[string]bool{}
- options["passwordupdate"] = pwdupdate
-
- if isSystemAdmin {
- options["fullname"] = true
- options["email"] = true
- } else {
- options["fullname"] = fullname
- options["email"] = email
- u.ClearNonProfileFields()
- }
+func (u *User) SanitizeProfile(options map[string]bool) {
+ u.ClearNonProfileFields()
u.Sanitize(options)
}