Fixing SanitizeProfile (#3930)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
717e8197ff
Коммит
eb0111f6bb
@@ -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)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user