diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-13 10:22:10 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-17 15:22:56 -0400 |
commit | fb42a74613a6a5c4ebe316cf6e528d74aa74bb78 (patch) | |
tree | be19155bfc46a052460c06987f8e78ba5ef54582 /api/user.go | |
parent | 31415c8ddcc915c64c791ece2e2439883b7cf6ae (diff) | |
download | chat-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.go | 4 |
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{}) |