2021-08-18 20:18:39 +02:00
|
|
|
package form
|
|
|
|
|
2021-11-12 09:10:15 +01:00
|
|
|
import "github.com/photoprism/photoprism/pkg/txt"
|
|
|
|
|
2021-08-18 20:18:39 +02:00
|
|
|
// UserCreate represents a User with a new password.
|
|
|
|
type UserCreate struct {
|
|
|
|
UserName string `json:"username"`
|
|
|
|
FullName string `json:"fullname"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
2021-11-12 09:10:15 +01:00
|
|
|
|
|
|
|
// Username returns the normalized username in lowercase and without whitespace padding.
|
|
|
|
func (f UserCreate) Username() string {
|
|
|
|
return txt.NormalizeUsername(f.UserName)
|
|
|
|
}
|