-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Do not issue update command if nothing has changed in user values #14967
Conversation
Let me debug this later today |
Partially added via #15052 to properly debug the CI failure in smaller steps. |
146333b
to
9a5ca23
Compare
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@@ -164,6 +164,7 @@ public function countUsers() { | |||
|
|||
public function setDisplayName($uid, $displayName) { | |||
$this->displayNames[$uid] = $displayName; | |||
return true; |
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 found the cause of the failure - no idea why it worked before, but it was also failing locally and this fixed it locally for me as well 🙌
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.
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.
But of course 😕
@@ -138,11 +138,12 @@ public function getDisplayName() { | |||
*/ | |||
public function setDisplayName($displayName) { | |||
$displayName = trim($displayName); | |||
if ($this->backend->implementsActions(Backend::SET_DISPLAYNAME) && !empty($displayName)) { | |||
$oldDisplayName = $this->getDisplayName(); | |||
if ($this->backend->implementsActions(Backend::SET_DISPLAYNAME) && !empty($displayName) && $displayName !== $oldDisplayName) { |
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.
Make sense. Just a small nitpick: !empty($displayName) && $displayName !== $oldDisplayName
is cheaper than implementsActions
.
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.
Something for later I would say.
Same as #14566 but rebased on master so that we can debug the failing CI.