WIP: Implement new role house manager

This commit is contained in:
Björn Fromme committed 2023-11-03 13:00:52 +01:00
1 parent 392ea3f16f
commit 538d39f63e
7 files changed
+84 -14

No files matched your search

+9 -3
View File
@@ -55,7 +55,8 @@ class UserDataHandler
ProfileResponse $profileResponse,
array $roles,
bool $isTeamer = false,
array $crmSelections = []
array $crmSelections = [],
?string $hotelCode = null
): User {
$user = new User();
$user
@@ -64,6 +65,7 @@ class UserDataHandler
->setEmail($profileResponse->getCommunication()->getEmail())
->setBusProPersonId($profileResponse->getPersonId())
->setBusProAddressId($profileResponse->getAddressId())
->setHotelCode($hotelCode)
->setRoles($roles)
;
@@ -93,9 +95,13 @@ class UserDataHandler
ProfileResponse $profileResponse,
array $roles,
bool $isTeamer = false,
array $crmSelections = []
array $crmSelections = [],
?string $hotelCode = null
): void {
$user->setRoles($roles);
$user
->setRoles($roles)
->setHotelCode($hotelCode)
;
if (true === $isTeamer) {
$address = Address::fromApiResponse($profileResponse);