config->setUserValue($user->getUID(), Application::APP_ID, 'enabled', $state ? '1' : '0'); $this->dispatcher->dispatchTyped(new StateChanged($user, $state)); } public function getState(IUser $user): bool { return $this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled', '0') === '1'; } }