diff --git a/lib/Service/ProvisioningService.php b/lib/Service/ProvisioningService.php index 3fa31925..3fa93b40 100644 --- a/lib/Service/ProvisioningService.php +++ b/lib/Service/ProvisioningService.php @@ -231,7 +231,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo } $account = $this->accountManager->getAccount($user); - $fallbackScope = 'v2-local'; + $fallbackScope = IAccountManager::SCOPE_LOCAL; $defaultScopes = array_merge( AccountManager::DEFAULT_SCOPES, $this->config->getSystemValue('account_manager.default_property_scope', []) ?? [] @@ -382,7 +382,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo $this->eventDispatcher->dispatchTyped($event); $this->logger->debug('Gender mapping event dispatched'); if ($event->hasValue() && $event->getValue() !== null && $event->getValue() !== '') { - $account->setProperty('gender', $event->getValue(), $fallbackScope, '1', ''); + $account->setProperty('gender', $event->getValue(), $fallbackScope, IAccountManager::VERIFIED, ''); } $simpleAccountPropertyAttributes = [ @@ -409,7 +409,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo $this->eventDispatcher->dispatchTyped($event); $this->logger->debug($property . ' mapping event dispatched'); if ($event->hasValue()) { - $account->setProperty($property, $event->getValue(), $defaultScopes[$property] ?? $fallbackScope, '1', ''); + $account->setProperty($property, $event->getValue(), $defaultScopes[$property] ?? $fallbackScope, IAccountManager::VERIFIED, ''); } }