mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
41d78ef523
* fix: return absolute url for avatar in user sessions * fix: refresh token unique constraint
30 lines
605 B
Go
30 lines
605 B
Go
package model
|
|
|
|
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
|
|
AvatarKey string
|
|
}
|
|
|
|
func (p *Profile) IsValid() bool {
|
|
return p.FirstName != "" && p.LastName != ""
|
|
}
|
|
|
|
func (p *Profile) SetNamesAsDisplayname() {
|
|
p.DisplayName = p.FirstName + " " + p.LastName
|
|
}
|