func New(u, p string) (*User, error) {
	if err := validateUsername(u); err != nil {
		return nil, err
	}
	if err := validatePassword(p); err != nil {
		return nil, err
	}
	bph := bcrypt.NewPasswordHandler()
	user := User{
		Username: u,
		password: p,
		ph:       bph,
	}
	return &user, nil
}
// New creates a new user with the specified name and password.
New creates a new user with the specified name and password.
// New creates a new user with the specified name and password .
func New(u, p string) (*User, error) {
	if err := validateUsername(u); err != nil {
		return nil, err
	}
	if err := validatePassword(p); err != nil {
		return nil, err
	}
	bph := bcrypt.NewPasswordHandler()
	user := User{
		Username: u,
		password: p,
		ph:       bph,
	}
	return &user, nil
}
func New ( u , p string ) ( * User , error ) { if err := validateUsername ( u ) ; err != nil { return nil , err } if err := validatePassword ( p ) ; err != nil { return nil , err } bph := bcrypt . NewPasswordHandler ( ) user := User { Username : u , password : p , ph : bph , } return & user , nil }
New creates a new user with the specified name and password.
New creates a new user with the specified name and password .