Lots of work on user password reset, #1456
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user