mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-17 05:18:04 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
32 lines
665 B
Go
32 lines
665 B
Go
package domain
|
|
|
|
import (
|
|
"golang.org/x/text/language"
|
|
|
|
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type Profile struct {
|
|
es_models.ObjectRoot
|
|
|
|
FirstName string
|
|
LastName string
|
|
NickName string
|
|
DisplayName string
|
|
PreferredLanguage language.Tag
|
|
Gender Gender
|
|
PreferredLoginName string
|
|
LoginNames []string
|
|
}
|
|
|
|
func (p *Profile) IsValid() bool {
|
|
return p.FirstName != "" && p.LastName != ""
|
|
}
|
|
|
|
func AvatarURL(prefix, resourceOwner, key string) string {
|
|
if prefix == "" || resourceOwner == "" || key == "" {
|
|
return ""
|
|
}
|
|
return prefix + "/" + resourceOwner + "/" + key
|
|
}
|