Skip to content

Don't process known avatars from LDAP - #17002

Merged
blizzz merged 1 commit into
masterfrom
fix/noid/ldap-dont-process-known-avas
Oct 2, 2019
Merged

Don't process known avatars from LDAP#17002
blizzz merged 1 commit into
masterfrom
fix/noid/ldap-dont-process-known-avas

Conversation

@blizzz

Copy link
Copy Markdown
Member

addendum to #17001 (see there for details)

  • stores the md5 hash of an avatar from LDAP to compare it later against. To reduce unnecessary updates.

* avoids useless FS operation
* avoids useless DB writes
* avoids useless addressbook updates
* addendum to #17001
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
// use the checksum before modifications
$checksum = md5($this->image->data());

if($checksum === $this->config->getUserValue($this->uid, 'user_ldap', 'lastAvatarChecksum', '')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A const for lastAvatarChecksum would be nice 👍

Comment threadapps/user_ldap/lib/User/User.php
@rullzerrullzer mentioned this pull request Sep 4, 2019
16 tasks
@rullzerrullzer modified the milestones: Nextcloud 17, Nextcloud 18Sep 5, 2019
@rullzer

Copy link
Copy Markdown
Member

Master is no 18 development. If this needs to go into 17 please follow the normal backport procedures after merging.

@blizzz

Copy link
Copy Markdown
MemberAuthor

/backport to stable17

@blizzz

Copy link
Copy Markdown
MemberAuthor

/backport to stable16

@blizzz

Copy link
Copy Markdown
MemberAuthor

still looking for another reviewer :)

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine by me

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code make sense!

@blizzz
blizzz merged commit e105d19 into masterOct 2, 2019
@blizzz
blizzz deleted the fix/noid/ldap-dont-process-known-avas branch October 2, 2019 14:32
@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable17 in #17372

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable16 in #17373

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@blizzz@rullzer@kesselb@skjnldsv