| @@ 1337-1346 (lines=10) @@ | ||
| 1334 | ) { |
|
| 1335 | //require_once '../../csrest_subscribers.php'; |
|
| 1336 | $wrap = new CS_REST_Subscribers($listID, $this->getAuth()); |
|
| 1337 | foreach ($customFields as $key => $customFieldValue) { |
|
| 1338 | if (!is_array($customFields[$key])) { |
|
| 1339 | $customFields[] = array( |
|
| 1340 | "Key" => $key, |
|
| 1341 | "Value" => $customFieldValue, |
|
| 1342 | "Clear" => $customFieldValue ? false : true |
|
| 1343 | ); |
|
| 1344 | unset($customFields[$key]); |
|
| 1345 | } |
|
| 1346 | } |
|
| 1347 | $result = $wrap->add( |
|
| 1348 | $request = array( |
|
| 1349 | 'EmailAddress' => $member->Email, |
|
| @@ 1395-1404 (lines=10) @@ | ||
| 1392 | if (!$oldEmailAddress) { |
|
| 1393 | $oldEmailAddress = $member->Email; |
|
| 1394 | } |
|
| 1395 | foreach ($customFields as $key => $customFieldValue) { |
|
| 1396 | if (!is_array($customFields[$key])) { |
|
| 1397 | $customFields[] = array( |
|
| 1398 | "Key" => $key, |
|
| 1399 | "Value" => $customFieldValue, |
|
| 1400 | "Clear" => $customFieldValue ? false : true |
|
| 1401 | ); |
|
| 1402 | unset($customFields[$key]); |
|
| 1403 | } |
|
| 1404 | } |
|
| 1405 | //require_once '../../csrest_subscribers.php'; |
|
| 1406 | $wrap = new CS_REST_Subscribers($listID, $this->getAuth()); |
|
| 1407 | $result = $wrap->update( |
|
| @@ 1463-1472 (lines=10) @@ | ||
| 1460 | } elseif (isset($customFields[$member->Email])) { |
|
| 1461 | $customFieldsForMember = $customFields[$member->Email]; |
|
| 1462 | } |
|
| 1463 | foreach ($customFieldsForMember as $key => $customFieldValue) { |
|
| 1464 | if (!is_array($customFieldsForMember[$key])) { |
|
| 1465 | $customFieldsForMember[] = array( |
|
| 1466 | "Key" => $key, |
|
| 1467 | "Value" => $customFieldValue, |
|
| 1468 | "Clear" => $customFieldValue ? false : true |
|
| 1469 | ); |
|
| 1470 | unset($customFieldsForMember[$key]); |
|
| 1471 | } |
|
| 1472 | } |
|
| 1473 | if ($member instanceof Member) { |
|
| 1474 | $importArray[] = array( |
|
| 1475 | 'EmailAddress' => $member->Email, |
|