Add changing email for users
This commit is contained in:
parent
e1ab2095fa
commit
1dca8e96a7
6 changed files with 164 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Reference in a new issue