|
|
@@ -521,13 +521,20 @@ class OrganizationFactory
|
|
|
$admin->setUsername('admin'.strtolower($organizationCreationRequest->getSubdomain()));
|
|
|
$randomString = ByteString::fromRandom(32)->toString();
|
|
|
$admin->setPassword($randomString);
|
|
|
+ $admin->setEnabled(true);
|
|
|
|
|
|
$adminAccess = new Access();
|
|
|
$adminAccess->setAdminAccess(true);
|
|
|
$adminAccess->setPerson($admin);
|
|
|
+ $adminAccess->setLoginEnabled(true);
|
|
|
$adminAccess->setCreateDate($organizationCreationRequest->getCreationDate());
|
|
|
$adminAccess->setCreatedBy($organizationCreationRequest->getAuthorId());
|
|
|
|
|
|
+ $contactPoint = new ContactPoint();
|
|
|
+ $contactPoint->setContactType(ContactPointTypeEnum::PRINCIPAL);
|
|
|
+ $contactPoint->setEmail($organizationCreationRequest->getEmail());
|
|
|
+ $admin->addContactPoint($contactPoint);
|
|
|
+
|
|
|
return $adminAccess;
|
|
|
}
|
|
|
|
|
|
@@ -649,8 +656,7 @@ class OrganizationFactory
|
|
|
*/
|
|
|
protected function makePersonContactPoint(OrganizationMemberCreationRequest $organizationMemberCreationRequest): ContactPoint
|
|
|
{
|
|
|
- $phoneUtil = PhoneNumberUtil::getInstance();
|
|
|
- $phoneNumber = $phoneUtil->parse($organizationMemberCreationRequest->getPhone());
|
|
|
+ $phoneNumber = $this->phoneNumberUtil->parse($organizationMemberCreationRequest->getPhone());
|
|
|
|
|
|
$contactPoint = new ContactPoint();
|
|
|
$contactPoint->setContactType(ContactPointTypeEnum::PRINCIPAL);
|
|
|
@@ -658,7 +664,7 @@ class OrganizationFactory
|
|
|
$contactPoint->setTelphone($phoneNumber);
|
|
|
|
|
|
if ($organizationMemberCreationRequest->getMobile() !== null) {
|
|
|
- $mobileNumber = $phoneUtil->parse($organizationMemberCreationRequest->getMobile());
|
|
|
+ $mobileNumber = $this->phoneNumberUtil->parse($organizationMemberCreationRequest->getMobile());
|
|
|
$contactPoint->setMobilPhone($mobileNumber);
|
|
|
}
|
|
|
|