We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cda079a + 7d768ad commit f00d130Copy full SHA for f00d130
gateway/src/main/java/org/georchestra/gateway/accounts/admin/AbstractAccountsManager.java
@@ -159,6 +159,11 @@ public void createUserOrgUniqueIdIfMissing(@NonNull GeorchestraUser mapped) thro
159
GeorchestraUser existing = findInternal(mapped).orElse(null);
160
// verify if user org match between ldap and OAuth2 info
161
if (!isSameOrgUniqueId(mapped, existing)) {
162
+ // force username from ldap instead unknown external username
163
+ // See issue #231 : https://github.com/georchestra/georchestra-gateway/issues/231
164
+ if (existing != null) {
165
+ mapped.setUsername(existing.getUsername());
166
+ }
167
// we find or create org from this orgUniqueId and add user to this org
168
// unlink
169
unlinkUserOrg(existing);
0 commit comments