mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 10:45:12 +00:00
fix: send preferred login name on init user mail (#3105)
* fix: send preferred login name on init user * trigger gh actions Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -196,12 +196,10 @@ func (u *NotifyUser) fillPreferredLoginNamesOnOrgUsers(event *es_models.Event) e
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
policy := new(query2.OrgIAMPolicy)
|
||||
if policy == nil {
|
||||
policy, err = u.getDefaultOrgIAMPolicy(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
policy, err := u.getDefaultOrgIAMPolicy(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !policy.UserLoginMustBeDomain {
|
||||
return nil
|
||||
@@ -225,12 +223,10 @@ func (u *NotifyUser) fillLoginNames(user *view_model.NotifyUser) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
policy := new(query2.OrgIAMPolicy)
|
||||
if policy == nil {
|
||||
policy, err = u.getDefaultOrgIAMPolicy(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
policy, err := u.getDefaultOrgIAMPolicy(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
user.SetLoginNames(policy, org.Domains)
|
||||
user.PreferredLoginName = user.GenerateLoginName(org.GetPrimaryDomain().Domain, policy.UserLoginMustBeDomain)
|
||||
|
||||
Reference in New Issue
Block a user