Repository navigation
Conversation
…ogin When an LDAP user logs in before a display name is set, Nextcloud falls back to the user id. Storing the display name for the first time was not announced as a change, so the generated avatar, the account data and the address book card kept showing the user id. Assisted-by: ClaudeCode:claude-opus-5.5 Signed-off-by: Ivan Sein <ivan@nextcloud.com>
Ivansss
requested review from
Altahrim,
come-nc and
cristianscheid
and removed request for
a team
November 26, 2026 16:17
3 of 8 tasks
Ivansss
force-pushed
the
fix/ldap-display-name-cache-before-event
branch
from
November 27, 2026 10:25
176c87a to
f9e87d5
Compare
The account already carries the display name of the user backend, so comparing against it skipped updating the stored account data. Email changes keep the comparison, as the account holds the stored email. Assisted-by: ClaudeCode:claude-opus-5.5 Signed-off-by: Ivan Sein <ivan@nextcloud.com>
Listeners of the display name change, like the avatar regeneration through the address book card, read the display name right away. They got the previous name from the LDAP cache, so the avatar showed the old initials. Assisted-by: ClaudeCode:claude-opus-5.5 Signed-off-by: Ivan Sein <ivan@nextcloud.com>
Ivansss
force-pushed
the
fix/ldap-display-name-cache-before-event
branch
from
November 27, 2026 12:00
f9e87d5 to
d7594bc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an LDAP display name changes, the avatar can end up showing the initials of the previous name.
composeAndStoreDisplayName()announces the change before the new name is written to the LDAP display name cache. Listeners act on the change right away: the address book card is rebuilt, and with it the avatar is regenerated. They read the display name from the cache, which still holds the previous name.This PR writes the display name to the cache inside
composeAndStoreDisplayName(), before the change is announced, and removes the now redundant cache writes after it inUser::processAttributes()andAccess::applyUserDisplayName(). The name is cached even when it didn't change, since an unchanged name isn't necessarily in the cache.This builds on #67048. With the cache holding the new name,
getAccount()returns it too, so without theAccounts\Hookschange from that PR the account data and the people search would no longer be updated on renames.Reproduced and validated on a live instance (master + OpenLDAP):
occ ldap:check-user --update <uid>, or let the background sync job run.oc_accountsand the people search show the new name.TODO
masteronce fix(user_ldap): announce display names that are set after the first login #67048 is mergedUser.phpusesIConfigthere)Checklist
3. to review, feature component)stable32)AI (if applicable)