summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-05-23 17:18:19 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-05-23 17:18:19 +0200
commit285c42ab14199ab1c6a5f32cf1590e7a0aa3be49 (patch)
tree54332cdf71b591da2954a7954416445bffb2c069
parent50ccfb4f5bd200c2b12b737c3c7ba8c0e4eb1302 (diff)
downloadnextcloud-server-285c42ab14199ab1c6a5f32cf1590e7a0aa3be49.tar.gz
nextcloud-server-285c42ab14199ab1c6a5f32cf1590e7a0aa3be49.zip
Fix user tests, avoid setting enabled state to the same value
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/User/User.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 8830b4aae71..3b7123bd575 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -467,10 +467,11 @@ class User implements IUser {
return (bool) $this->enabled;
};
$this->backend->setUserEnabled($this->uid, $enabled, $queryDatabaseValue, $setDatabaseValue);
- } else {
+ if ($oldStatus !== $enabled) {
+ $this->triggerChange('enabled', $enabled, $oldStatus);
+ }
+ } elseif ($oldStatus !== $enabled) {
$setDatabaseValue($enabled);
- }
- if ($oldStatus !== $enabled) {
$this->triggerChange('enabled', $enabled, $oldStatus);
}
}