Lots of work on user password reset, #1456

This commit is contained in:
Torkel Ödegaard
2015-06-08 13:39:02 +02:00
parent aa4d60c21e
commit c8bc0b3bf8
8 changed files with 129 additions and 50 deletions
+9
View File
@@ -1,5 +1,9 @@
package models
import "errors"
var ErrInvalidEmailCode = errors.New("Invalid or expired email code")
type SendEmailCommand struct {
To []string
From string
@@ -13,6 +17,11 @@ type SendResetPasswordEmailCommand struct {
User *User
}
type ValidateResetPasswordCodeQuery struct {
Code string
Result *User
}
// create mail content
func (m *SendEmailCommand) Content() string {
contentType := "text/html; charset=UTF-8"