custer fixed error replacing all emails arguments
This commit is contained in:
@@ -33,11 +33,6 @@ function prepare_emails_CIPF($email_name, $user_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($user_id)) {
|
||||
$user_id = get_current_user_id();
|
||||
}
|
||||
$user = get_user_by('id', $user_id);
|
||||
$user_email = $user->user_email;
|
||||
$header_content_type = 'Content-Type: text/html; charset=UTF-8';
|
||||
|
||||
|
||||
@@ -59,7 +54,7 @@ function prepare_emails_CIPF($email_name, $user_id) {
|
||||
$tmp_email['message'] = $email['notification_message'];
|
||||
$tmp_email['headers'] = array();
|
||||
$tmp_email['headers'][] = $header_content_type;
|
||||
$tmp_email['headers'][] = 'User_id: '.$user_id;
|
||||
$tmp_email['headers']['user_id'] = $user_id;
|
||||
$from = $email['notification_from'];
|
||||
if (empty($from)) {
|
||||
$from = get_option('admin_email');
|
||||
@@ -71,12 +66,20 @@ function prepare_emails_CIPF($email_name, $user_id) {
|
||||
}
|
||||
if (isset($email['confirmation_send']) && $email['confirmation_send'] === 'on') {
|
||||
$tmp_email = array();
|
||||
if (is_null($user_id)) {
|
||||
$user_id = get_current_user_id();
|
||||
}
|
||||
if ($user_id === 0) {
|
||||
return false;
|
||||
}
|
||||
$user = get_user_by('id', $user_id);
|
||||
$user_email = $user->user_email;
|
||||
$tmp_email['to'] = $user_email;
|
||||
$tmp_email['subject'] = $email['confirmation_subject'];
|
||||
$tmp_email['message'] = $email['confirmation_message'];
|
||||
$tmp_email['headers'] = array();
|
||||
$tmp_email['headers'][] = $header_content_type;
|
||||
$tmp_email['headers'][] = 'User_id: '.$user_id;
|
||||
$tmp_email['headers']['user_id'] = $user_id;
|
||||
$from = $email['confirmation_from'];
|
||||
if (empty($from)) {
|
||||
$from = get_option('admin_email');
|
||||
|
||||
Reference in New Issue
Block a user