summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-07-13 10:22:10 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-07-17 15:22:56 -0400
commitfb42a74613a6a5c4ebe316cf6e528d74aa74bb78 (patch)
treebe19155bfc46a052460c06987f8e78ba5ef54582 /api/user.go
parent31415c8ddcc915c64c791ece2e2439883b7cf6ae (diff)
downloadchat-fb42a74613a6a5c4ebe316cf6e528d74aa74bb78.tar.gz
chat-fb42a74613a6a5c4ebe316cf6e528d74aa74bb78.tar.bz2
chat-fb42a74613a6a5c4ebe316cf6e528d74aa74bb78.zip
Use User.FirstName instead of trying to infer a user's first name from their nickname in multiple places.
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go
index 48a9f0da2..10948c63d 100644
--- a/api/user.go
+++ b/api/user.go
@@ -181,14 +181,14 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User {
l4g.Error("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", ruser.Id, ruser.TeamId, err)
}
- //fireAndForgetWelcomeEmail(strings.Split(ruser.Nickname, " ")[0], ruser.Email, team.Name, c.TeamUrl+"/channels/town-square")
+ //fireAndForgetWelcomeEmail(ruser.FirstName, ruser.Email, team.Name, c.TeamUrl+"/channels/town-square")
if user.EmailVerified {
if cresult := <-Srv.Store.User().VerifyEmail(ruser.Id); cresult.Err != nil {
l4g.Error("Failed to set email verified err=%v", cresult.Err)
}
} else {
- FireAndForgetVerifyEmail(result.Data.(*model.User).Id, strings.Split(ruser.Nickname, " ")[0], ruser.Email, team.Name, c.TeamUrl)
+ FireAndForgetVerifyEmail(result.Data.(*model.User).Id, ruser.FirstName, ruser.Email, team.Name, c.TeamUrl)
}
ruser.Sanitize(map[string]bool{})