photoprism/internal/form/user.go
Michael Mayer 85561547cc Auth: Add "PHOTOPRISM_ADMIN_USER" option and refactor user table #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-02 21:30:50 +02:00

15 lines
409 B
Go

package form
import "github.com/photoprism/photoprism/pkg/clean"
// UserCreate represents a User with a new password.
type UserCreate struct {
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
}
// UsernameClean returns the username in lowercase and with whitespace trimmed.
func (f UserCreate) UsernameClean() string {
return clean.Login(f.Username)
}