namibia
Diff Revisions
a47412 ...
vs
da65b1 ...
for module/User/src/User/Service/Registration.php
|
@@ -23,13 +23,26 @@ |
23 |
23 |
|
{ |
24 |
24 |
|
$contactService = new \Person\Service\Contact(); |
25 |
25 |
|
$contactService->setWorkflow(new \Person\Workflow()); |
26 |
|
- |
// $companyService = new \Company\Service\Company(); |
27 |
|
- |
// $companyService->setWorkflow(new \Company\Workflow()); |
|
26 |
+ |
$companyService = new \Company\Service\Company(); |
|
27 |
+ |
$companyService->setWorkflow(new \Company\Workflow()); |
28 |
28 |
|
$profileService = new \User\Service\Profile(); |
29 |
29 |
|
$profileService->setWorkflow(new \User\Workflow()); |
30 |
30 |
|
//\Utility\Debug::errorLog('create contact', $session->Contact); |
|
31 |
+ |
|
|
32 |
+ |
$session->Contact['firstName']=$session->Profile['firstName']; |
|
33 |
+ |
$session->Contact['familyName']=$session->Profile['familyName']; |
|
34 |
+ |
$session->Contact['email']=$session->Profile['email']; |
|
35 |
+ |
$session->Contact['mobile']=$session->Profile['mobile']; |
|
36 |
+ |
|
|
37 |
+ |
|
31 |
38 |
|
$contact = $contactService->create($session->Contact); |
32 |
39 |
|
$session->Company['contact'] = $contact->id; |
|
40 |
+ |
$session->Company['name']= $session->Profile['firstName'].' '.$session->Profile['familyName']; |
|
41 |
+ |
$session->Company['businessName']= $session->Profile['firstName'].' '.$session->Profile['familyName']; |
|
42 |
+ |
$session->Company['group']= '3'; |
|
43 |
+ |
$session->Company['groupDivision']= '3'; |
|
44 |
+ |
// $session->Company['region']= '1'; |
|
45 |
+ |
// $session->Company['city']= '1'; |
33 |
46 |
|
// if (isset($session->BillingContact)) |
34 |
47 |
|
// { |
35 |
48 |
|
// //\Utility\Debug::errorLog('create billing contact', $session->BillingContact); |
|
@@ -37,8 +50,8 @@ |
37 |
50 |
|
// $session->Company['contbillingContactact'] = $billingContact->id; |
38 |
51 |
|
// } |
39 |
52 |
|
//\Utility\Debug::errorLog('create company', $session->Company); |
40 |
|
- |
// $company = $companyService->create($session->Company); |
41 |
|
- |
// $session->Profile['company'] = $company->id; |
|
53 |
+ |
$company = $companyService->create($session->Company); |
|
54 |
+ |
$session->Profile['company'] = $company->id; |
42 |
55 |
|
// if ($session->Profile['permissions'] < 5 || $session->Profile['permissions'] > 8) |
43 |
56 |
|
// { |
44 |
57 |
|
// $session->Profile['permissions'] = 5; |