Skip to content

Commit

Permalink
Merge pull request #21308 from mattwire/deprecatedjoi
Browse files Browse the repository at this point in the history
Fix deprecated API4 Join on Email in dynamic profile
  • Loading branch information
seamuslee001 authored Aug 29, 2021
2 parents f01582a + 7169ba0 commit 76ab5d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Profile/Page/Dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ protected function getLinkedEmail($email): string {
if (!$email) {
return '';
}
$emailID = Email::get()->setOrderBy(['is_primary' => 'DESC'])->setWhere([['contact_id', '=', $this->_id], ['email', '=', $email], ['on_hold', '=', FALSE], ['contact.is_deceased', '=', FALSE], ['contact.is_deleted', '=', FALSE], ['contact.do_not_email', '=', FALSE]])->execute()->first()['id'];
$emailID = Email::get()->setOrderBy(['is_primary' => 'DESC'])->setWhere([['contact_id', '=', $this->_id], ['email', '=', $email], ['on_hold', '=', FALSE], ['contact_id.is_deceased', '=', FALSE], ['contact_id.is_deleted', '=', FALSE], ['contact_id.do_not_email', '=', FALSE]])->execute()->first()['id'];
if (!$emailID) {
return $email;
}
Expand Down

0 comments on commit 76ab5d0

Please sign in to comment.