From c09f1b9e4e5638080622ff9aa70735db382a16df Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 9 Jul 2015 13:59:19 -0400 Subject: Renamed FullName column in database to Nickname. Renamed all serverside references from FullName to Nickname. --- model/user.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'model/user.go') diff --git a/model/user.go b/model/user.go index c5a4d846d..88f8f718a 100644 --- a/model/user.go +++ b/model/user.go @@ -37,7 +37,7 @@ type User struct { AuthData string `json:"auth_data"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` - FullName string `json:"full_name"` + Nickname string `json:"nickname"` Roles string `json:"roles"` LastActivityAt int64 `json:"last_activity_at"` LastPingAt int64 `json:"last_ping_at"` @@ -82,8 +82,8 @@ func (u *User) IsValid() *AppError { return NewAppError("User.IsValid", "Invalid email", "user_id="+u.Id) } - if len(u.FullName) > 64 { - return NewAppError("User.IsValid", "Invalid full name", "user_id="+u.Id) + if len(u.Nickname) > 64 { + return NewAppError("User.IsValid", "Invalid nickname", "user_id="+u.Id) } return nil @@ -152,7 +152,7 @@ func (u *User) SetDefaultNotifications() { u.NotifyProps["first_name"] = "false" u.NotifyProps["all"] = "true" u.NotifyProps["channel"] = "true" - splitName := strings.Split(u.FullName, " ") + splitName := strings.Split(u.Nickname, " ") if len(splitName) > 0 && splitName[0] != "" { u.NotifyProps["first_name"] = "true" u.NotifyProps["mention_keys"] += "," + splitName[0] @@ -191,7 +191,7 @@ func (u *User) Sanitize(options map[string]bool) { u.Email = "" } if len(options) != 0 && !options["fullname"] { - u.FullName = "" + u.Nickname = "" } if len(options) != 0 && !options["skypeid"] { // TODO - fill in when SkypeId is added to user model -- cgit v1.2.3-1-g7c22