diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-09-02 12:24:20 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-09-02 08:24:20 -0800 |
commit | eb0111f6bbe2b0bf160a674dfe1b4d089f905cb9 (patch) | |
tree | 153eb3766b04b58171cad0f2e70136ff84c0d123 /model/user.go | |
parent | 717e8197ffd378d644d868a1b5e9f96c5385b41e (diff) | |
download | chat-eb0111f6bbe2b0bf160a674dfe1b4d089f905cb9.tar.gz chat-eb0111f6bbe2b0bf160a674dfe1b4d089f905cb9.tar.bz2 chat-eb0111f6bbe2b0bf160a674dfe1b4d089f905cb9.zip |
Fixing SanitizeProfile (#3930)
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 14 |
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) } |