1
0

Add changing email for users

This commit is contained in:
kolaente
2020-04-17 16:01:45 +02:00
parent e1ab2095fa
commit 1dca8e96a7
6 changed files with 164 additions and 7 deletions

View File

@ -252,7 +252,7 @@ func CreateUser(user *User) (newUser *User, err error) {
// The new user should not be activated until it confirms his mail address
newUser.IsActive = false
// Generate a confirm token
newUser.EmailConfirmToken = utils.MakeRandomString(400)
newUser.EmailConfirmToken = utils.MakeRandomString(60)
}
// Insert it
@ -277,7 +277,8 @@ func CreateUser(user *User) (newUser *User, err error) {
// Send the user a mail with a link to confirm the mail
data := map[string]interface{}{
"User": newUserOut,
"User": newUserOut,
"IsNew": true,
}
mail.SendMailWithTemplate(user.Email, newUserOut.Username+" + Vikunja = <3", "confirm-email", data)