2021-08-18 20:18:39 +02:00
|
|
|
package form
|
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
import "github.com/photoprism/photoprism/pkg/clean"
|
2021-11-12 09:10:15 +01:00
|
|
|
|
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 {
|
2022-04-15 09:42:07 +02:00
|
|
|
return clean.Username(f.UserName)
|
2021-11-12 09:10:15 +01:00
|
|
|
}
|