mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 06:57:33 +00:00
fix: language.Tag marshalling (#1110)
* fix(searchlimit): increase to 1000 * rafactor: remove unused return * fix(user): marshalling of language tag * fix(spooler): shuffle handlers on start * fix(sql): reduce max open conns from 200 to 25 per pod * chore(deps): google.golang.org/grpc and github.com/lib/pq * chore(deps): update github.com/cockroachdb/cockroach-go/v2
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
type Human struct {
|
||||
*User `json:"-"`
|
||||
user *User `json:"-"`
|
||||
|
||||
*Password
|
||||
*Profile
|
||||
@@ -231,27 +231,27 @@ func (h *Human) AppendEvent(event *es_models.Event) (err error) {
|
||||
}
|
||||
|
||||
func (h *Human) ComputeObject() {
|
||||
if h.State == int32(model.UserStateUnspecified) || h.State == int32(model.UserStateInitial) {
|
||||
if h.user.State == int32(model.UserStateUnspecified) || h.user.State == int32(model.UserStateInitial) {
|
||||
if h.Email != nil && h.IsEmailVerified {
|
||||
h.State = int32(model.UserStateActive)
|
||||
h.user.State = int32(model.UserStateActive)
|
||||
} else {
|
||||
h.State = int32(model.UserStateInitial)
|
||||
h.user.State = int32(model.UserStateInitial)
|
||||
}
|
||||
}
|
||||
if h.Password != nil && h.Password.ObjectRoot.IsZero() {
|
||||
h.Password.ObjectRoot = h.User.ObjectRoot
|
||||
h.Password.ObjectRoot = h.user.ObjectRoot
|
||||
}
|
||||
if h.Profile != nil && h.Profile.ObjectRoot.IsZero() {
|
||||
h.Profile.ObjectRoot = h.User.ObjectRoot
|
||||
h.Profile.ObjectRoot = h.user.ObjectRoot
|
||||
}
|
||||
if h.Email != nil && h.Email.ObjectRoot.IsZero() {
|
||||
h.Email.ObjectRoot = h.User.ObjectRoot
|
||||
h.Email.ObjectRoot = h.user.ObjectRoot
|
||||
}
|
||||
if h.Phone != nil && h.Phone.ObjectRoot.IsZero() {
|
||||
h.Phone.ObjectRoot = h.User.ObjectRoot
|
||||
h.Phone.ObjectRoot = h.user.ObjectRoot
|
||||
}
|
||||
if h.Address != nil && h.Address.ObjectRoot.IsZero() {
|
||||
h.Address.ObjectRoot = h.User.ObjectRoot
|
||||
h.Address.ObjectRoot = h.user.ObjectRoot
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user