Merge pull request #21261 from totten/master-test-jwt
[civicrm-core.git] / CRM / Profile / Page / Dynamic.php
index 7ce7eeef62bb2bb7d03554cb11457771d41d3c2f..2e05630f61b5ddaee03f2459146d37e04b54fa36 100644 (file)
@@ -446,7 +446,7 @@ class CRM_Profile_Page_Dynamic extends CRM_Core_Page {
     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;
     }