summaryrefslogtreecommitdiffstats
path: root/lib/private/User/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/User.php')
-rw-r--r--lib/private/User/User.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 56c489181de..e171a65f8ce 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -349,13 +349,12 @@ class User implements IUser {
*
* @param bool $enabled
*/
- public function setEnabled($enabled) {
+ public function setEnabled(bool $enabled = true) {
$oldStatus = $this->isEnabled();
$this->enabled = $enabled;
- $enabled = $enabled ? 'true' : 'false';
if ($oldStatus !== $this->enabled) {
$this->triggerChange('enabled', $enabled);
- $this->config->setUserValue($this->uid, 'core', 'enabled', $enabled);
+ $this->config->setUserValue($this->uid, 'core', 'enabled', $enabled ? 'true' : 'false');
}
}