fix: register user on org (#1614)

* fix: user register

* fix: user register translation

* display suffix correctly

* Update auth_request.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-04-19 12:43:17 +02:00
committed by GitHub
parent edc0958e41
commit 2768ab4184
5 changed files with 55 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ func (f Gender) Valid() bool {
}
func (u *Human) IsValid() bool {
return u.Profile != nil && u.Profile.IsValid() && u.Email != nil && u.Email.IsValid() && u.Phone == nil || (u.Phone != nil && u.Phone.PhoneNumber != "" && u.Phone.IsValid())
return u.Username != "" && u.Profile != nil && u.Profile.IsValid() && u.Email != nil && u.Email.IsValid() && u.Phone == nil || (u.Phone != nil && u.Phone.PhoneNumber != "" && u.Phone.IsValid())
}
func (u *Human) CheckOrgIAMPolicy(policy *OrgIAMPolicy) error {