Skip to content

Commit

Permalink
Fix #10513 - When field to be updated is email1 then use new logic to…
Browse files Browse the repository at this point in the history
… update related email account record

Load relationship and set email_address and email_address_caps
  • Loading branch information
JackBuchanan committed Sep 3, 2024
1 parent 1a114a9 commit 50ba611
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Api/V8/Service/ModuleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,14 @@ protected function processAttributes(&$bean, $attributes)
} elseif ($property === 'filename') {
$createFile = true;
continue;

}elseif ($property === 'email1'){
foreach($bean->emailAddress->addresses as $index => $email){
if($email["email_address"] === $bean->$property){
$bean->emailAddress->addresses[$index]["email_address"] = $value;
$bean->emailAddress->addresses[$index]["email_address_caps"] = strtoupper($value);
}
}
}

$bean->$property = $value;
Expand Down

0 comments on commit 50ba611

Please sign in to comment.