Change default email domain for LDAP users (#25425)

Fixes #21169

Change `localhost` to `localhost.local`
pull/25309/head^2
Zettat123 1 year ago committed by GitHub
parent 93cd579269
commit a55ff0dd99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      services/auth/source/ldap/source_authenticate.go
  2. 2
      services/auth/source/ldap/source_sync.go

@ -76,7 +76,7 @@ func (source *Source) Authenticate(user *user_model.User, userName, password str
}
if len(sr.Mail) == 0 {
sr.Mail = fmt.Sprintf("%s@localhost", sr.Username)
sr.Mail = fmt.Sprintf("%s@localhost.local", sr.Username)
}
user = &user_model.User{

@ -104,7 +104,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error {
}
if len(su.Mail) == 0 {
su.Mail = fmt.Sprintf("%s@localhost", su.Username)
su.Mail = fmt.Sprintf("%s@localhost.local", su.Username)
}
fullName := composeFullName(su.Name, su.Surname, su.Username)

Loading…
Cancel
Save