Skip to content

Commit 0aa9580

Browse files
committed
use IAccountManager constants in provisioning service when dealing with account properties
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 3d04f94 commit 0aa9580

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Service/ProvisioningService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo
231231
}
232232

233233
$account = $this->accountManager->getAccount($user);
234-
$fallbackScope = 'v2-local';
234+
$fallbackScope = IAccountManager::SCOPE_LOCAL;
235235
$defaultScopes = array_merge(
236236
AccountManager::DEFAULT_SCOPES,
237237
$this->config->getSystemValue('account_manager.default_property_scope', []) ?? []
@@ -382,7 +382,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo
382382
$this->eventDispatcher->dispatchTyped($event);
383383
$this->logger->debug('Gender mapping event dispatched');
384384
if ($event->hasValue() && $event->getValue() !== null && $event->getValue() !== '') {
385-
$account->setProperty('gender', $event->getValue(), $fallbackScope, '1', '');
385+
$account->setProperty('gender', $event->getValue(), $fallbackScope, IAccountManager::VERIFIED, '');
386386
}
387387

388388
$simpleAccountPropertyAttributes = [
@@ -409,7 +409,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo
409409
$this->eventDispatcher->dispatchTyped($event);
410410
$this->logger->debug($property . ' mapping event dispatched');
411411
if ($event->hasValue()) {
412-
$account->setProperty($property, $event->getValue(), $defaultScopes[$property] ?? $fallbackScope, '1', '');
412+
$account->setProperty($property, $event->getValue(), $defaultScopes[$property] ?? $fallbackScope, IAccountManager::VERIFIED, '');
413413
}
414414
}
415415

0 commit comments

Comments
 (0)