Skip to content

Commit fcfa7de

Browse files
author
Leon Klingele
committed
lib/private/User: add reminder to first change 'enabled' property, then issue event
A new event, 'preChangeUser', should be used for this instead. See #14565.
1 parent 2e28bbf commit fcfa7de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/private/User/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ public function setEnabled(bool $enabled = true) {
365365
$oldStatus = $this->isEnabled();
366366
$this->enabled = $enabled;
367367
if ($oldStatus !== $this->enabled) {
368+
// TODO: First change the value, then trigger the event as done for all other properties.
368369
$this->triggerChange('enabled', $enabled, $oldStatus);
369370
$this->config->setUserValue($this->uid, 'core', 'enabled', $enabled ? 'true' : 'false');
370371
}

0 commit comments

Comments
 (0)