Sanitize FirstName and LastName fields of an object instead of the nickname when ShowFullName is set to false

This commit is contained in:
hmhealey
2015-07-10 16:52:32 -04:00
parent b620960cde
commit 31415c8ddc
2 changed files with 2 additions and 4 deletions

View File

@@ -20,9 +20,6 @@ func (o *ExtraMember) Sanitize(options map[string]bool) {
if len(options) == 0 || !options["email"] {
o.Email = ""
}
if len(options) == 0 || !options["fullname"] {
o.Nickname = ""
}
}
type ChannelExtra struct {

View File

@@ -201,7 +201,8 @@ func (u *User) Sanitize(options map[string]bool) {
u.Email = ""
}
if len(options) != 0 && !options["fullname"] {
u.Nickname = ""
u.FirstName = ""
u.LastName = ""
}
if len(options) != 0 && !options["skypeid"] {
// TODO - fill in when SkypeId is added to user model