Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
wp-civicrm-mailer
Commits
10713a70
Commit
10713a70
authored
Sep 06, 2021
by
bgm
Committed by
bgm
Sep 06, 2021
Browse files
Avoid try/catch, seems to cause issues with some error handlers
parent
23161faa
Changes
1
Hide whitespace changes
Inline
Side-by-side
civicrm_mailer.http.class.php
View file @
10713a70
...
...
@@ -58,20 +58,19 @@ class CivicrmMailerHTTPMailer extends \PHPMailer
}
if
(
$uf_id
)
{
try
{
$uf
=
civicrm_api3
(
'UFMatch'
,
'getsingle'
,
[
'uf_id'
=>
$uf_id
,
]);
// The uf_match might not exist yet.
// For example: user account creation through a CiviCRM profile.
// This is OK, the code below will fetch by email.
$uf
=
civicrm_api3
(
'UFMatch'
,
'get'
,
[
'uf_id'
=>
$uf_id
,
'sequential'
=>
1
,
]);
if
(
!
empty
(
$uf
[
'values'
][
0
]))
{
$contact
=
civicrm_api3
(
'Contact'
,
'getsingle'
,
[
'id'
=>
$uf
[
'contact_id'
],
'id'
=>
$uf
[
'
values'
][
0
][
'
contact_id'
],
]);
}
catch
(
Exception
$e
)
{
// The uf_match might not exist yet.
// For example: user account creation through a CiviCRM profile.
// This is OK, the code below will fetch by email.
}
}
// The user might not exist.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment