| @@ 235-243 (lines=9) @@ | ||
| 232 | $listPage = CampaignMonitorSignupPage::get()->filter(array("ListID" => $listPage))->first(); |
|
| 233 | } |
|
| 234 | //internal database |
|
| 235 | if ($listPage && $listPage->GroupID) { |
|
| 236 | if ($gp = Group::get()->byID($listPage->GroupID)) { |
|
| 237 | $groups = $this->owner->Groups(); |
|
| 238 | if ($groups) { |
|
| 239 | $this->owner->Groups()->add($gp); |
|
| 240 | $outcome++; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | } |
|
| 244 | if ($listPage && $listPage->ListID) { |
|
| 245 | if ($api->getSubscriber($listPage->ListID, $this->owner)) { |
|
| 246 | if ($api->updateSubscriber( |
|
| @@ 286-294 (lines=9) @@ | ||
| 283 | if (is_string($listPage)) { |
|
| 284 | $listPage = CampaignMonitorSignupPage::get()->filter(array("ListID" => $listPage))->first(); |
|
| 285 | } |
|
| 286 | if ($listPage->GroupID) { |
|
| 287 | if ($gp = Group::get()->byID($listPage->GroupID)) { |
|
| 288 | $groups = $this->owner->Groups(); |
|
| 289 | if ($groups) { |
|
| 290 | $this->owner->Groups()->remove($gp); |
|
| 291 | $outcome++; |
|
| 292 | } |
|
| 293 | } |
|
| 294 | } |
|
| 295 | if ($listPage->ListID) { |
|
| 296 | if (!$api->unsubscribeSubscriber($listPage->ListID, $this->owner)) { |
|
| 297 | $outcome++; |
|