diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-09 13:59:19 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-17 15:13:24 -0400 |
commit | c09f1b9e4e5638080622ff9aa70735db382a16df (patch) | |
tree | a05d7d71d87cf436c30424a2f34e0cb0db9aaff1 /model/user.go | |
parent | 1d7509493e65324d1e81bf39c51a9d7c07335c56 (diff) | |
download | chat-c09f1b9e4e5638080622ff9aa70735db382a16df.tar.gz chat-c09f1b9e4e5638080622ff9aa70735db382a16df.tar.bz2 chat-c09f1b9e4e5638080622ff9aa70735db382a16df.zip |
Renamed FullName column in database to Nickname. Renamed all serverside references from FullName to Nickname.
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 10 |
1 files changed, 5 insertions, 5 deletions
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 |