summaryrefslogtreecommitdiffstats
path: root/modules/mailer/mail.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-19 12:50:44 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-19 12:50:44 -0400
commit35d473f04ac79990a35499fbf3c4998170e655e1 (patch)
treefca64b6679336766ffc6965f3f09974c9d3da348 /modules/mailer/mail.go
parentc6e12d256833095d76bbb5755261507ecbdaada9 (diff)
downloadgitea-35d473f04ac79990a35499fbf3c4998170e655e1.tar.gz
gitea-35d473f04ac79990a35499fbf3c4998170e655e1.zip
Finish verify email
Diffstat (limited to 'modules/mailer/mail.go')
-rw-r--r--modules/mailer/mail.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go
index de4f24a47d..c1d12bba45 100644
--- a/modules/mailer/mail.go
+++ b/modules/mailer/mail.go
@@ -37,9 +37,9 @@ func GetMailTmplData(user *models.User) map[interface{}]interface{} {
// create a time limit code for user active
func CreateUserActiveCode(user *models.User, startInf interface{}) string {
- hours := base.Service.ActiveCodeLives / 60
+ minutes := base.Service.ActiveCodeLives
data := base.ToStr(user.Id) + user.Email + user.LowerName + user.Passwd + user.Rands
- code := base.CreateTimeLimitCode(data, hours, startInf)
+ code := base.CreateTimeLimitCode(data, minutes, startInf)
// add tail hex username
code += hex.EncodeToString([]byte(user.LowerName))
@@ -70,11 +70,11 @@ func SendRegisterMail(r *middleware.Render, user *models.User) {
func SendActiveMail(r *middleware.Render, user *models.User) {
code := CreateUserActiveCode(user, nil)
- subject := "Verify your email address"
+ subject := "Verify your e-mail address"
data := GetMailTmplData(user)
data["Code"] = code
- body, err := r.HTMLString("mail/auth/active_email.html", data)
+ body, err := r.HTMLString("mail/auth/active_email", data)
if err != nil {
log.Error("mail.SendActiveMail(fail to render): %v", err)
return