-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ldap avatar handling #50162
base: master
Are you sure you want to change the base?
Improve ldap avatar handling #50162
Conversation
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Should be at login, in sync job, and when running ldap:check-user --update Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A question, code looks good.
// external mounts are mounted properly (e.g. with login | ||
// credentials from the session). | ||
Util::connectHook('OC_User', 'post_login', $this, 'updateAvatarPostLogin'); | ||
$this->updateAvatar(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure, whether you tested this with a clean user, who has not logged in before, and has an avatar set on LDAP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with the check-user command and the background job Sync, it does make the avatar from LDAP appear for users even if they never logged in.
Loading the user list does not make the avatar sync (on purpose I expect). I do not remember if loading the profile page does it.
At least with this PR when the avatar is fetched from LDAP it is synchronized. What the PR does not change is in which cases the avatar attribute is fetched.
I may try to backport a simplified version without the code cleaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading the user list does not make the avatar sync (on purpose I expect).
Indeed, this is left out with responsiveness in mind.
I do not remember if loading the profile page does it.
It does.
Summary
Checklist