mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 13:11:52 +02:00
Quick-Add-User email fixes.
This commit is contained in:
parent
c8fbb3957a
commit
fb223639c1
@ -1446,7 +1446,7 @@ class users_admin_ui extends e_admin_ui
|
||||
// activate and send password
|
||||
$check = $sysuser->email('quickadd', array(
|
||||
'user_password' => $savePassword,
|
||||
'mail_subject' => USRLAN_187.SITENAME,
|
||||
'mail_subject' => USRLAN_187,
|
||||
'activation_url' => USRLAN_246,
|
||||
));
|
||||
break;
|
||||
@ -1459,7 +1459,7 @@ class users_admin_ui extends e_admin_ui
|
||||
|
||||
$check = $sysuser->email('quickadd', array(
|
||||
'user_password' => $savePassword,
|
||||
'mail_subject' => USRLAN_187.SITENAME,
|
||||
'mail_subject' => USRLAN_187,
|
||||
'activation_url' => SITEURL."signup.php?activate.".$sysuser->getId().".".$sysuser->getValue('sess'),
|
||||
));
|
||||
break;
|
||||
|
@ -765,7 +765,7 @@ class e107Email extends PHPMailer
|
||||
}
|
||||
|
||||
$eml['shortcodes']['BODY'] = !empty($eml['body']) ? $eml['body'] : ''; // $tp->toEmail($eml['body']) : '';
|
||||
$eml['shortcodes']['SUBJECT'] = !empty($eml['subject']) ?$eml['subject'] : '';
|
||||
$eml['shortcodes']['SUBJECT'] = !empty($eml['subject']) ? $eml['subject'] : '';
|
||||
$eml['shortcodes']['THEME'] = ($this->previewMode == true) ? e_THEME_ABS.$this->pref['sitetheme'].'/' : e_THEME.$this->pref['sitetheme'].'/'; // Always use front-end theme path.
|
||||
|
||||
|
||||
@ -845,12 +845,20 @@ class e107Email extends PHPMailer
|
||||
if($this->debug)
|
||||
{
|
||||
// echo "<h4>e107Email::arraySet() - line ".__LINE__."</h4>";
|
||||
|
||||
var_dump($eml['shortcodes']);
|
||||
var_dump($this->Subject);
|
||||
// print_a($tmpl);
|
||||
}
|
||||
|
||||
unset($eml['add_html_header']); // disable other headers when template is used.
|
||||
|
||||
$this->Subject = $tp->parseTemplate($tmpl['subject'], true, varset($eml['shortcodes'],null));
|
||||
$this->Subject = $tp->parseTemplate($tmpl['subject'], true, varset($eml['shortcodes'],null));
|
||||
|
||||
if($this->debug)
|
||||
{
|
||||
var_dump($this->Subject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1037,6 +1045,7 @@ class e107Email extends PHPMailer
|
||||
else
|
||||
{ // Debug
|
||||
$result = true;
|
||||
echo "<h2>Subject: ".$this->Subject."</h2>";
|
||||
// echo "<h2>SendEmail()->Body</h2>";
|
||||
// print_a($this->Body);
|
||||
// echo "<h2>SendEmail()->AltBody</h2>";
|
||||
|
@ -1169,7 +1169,7 @@ class e_system_user extends e_user_model
|
||||
{
|
||||
if($this->debug)
|
||||
{
|
||||
echo '$eml returned nothing on Line 1050 of user_model.php using $type = '.$type;
|
||||
echo '$eml returned nothing on Line '.__LINE__.' of user_model.php using $type = '.$type;
|
||||
print_a($userInfo);
|
||||
}
|
||||
return false;
|
||||
@ -1180,6 +1180,8 @@ class e_system_user extends e_user_model
|
||||
{
|
||||
echo '<h3>$eml array</h3>';
|
||||
print_a($eml);
|
||||
$temp = var_export($eml, true);
|
||||
print_a($temp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1346,7 +1348,7 @@ class e_system_user extends e_user_model
|
||||
$sc['EMAIL'] = $userInfo['user_email'];
|
||||
$sc['ACTIVATION_URL'] = $userInfo['activation_url'];
|
||||
|
||||
$ret['email_subject'] = $EMAIL_TEMPLATE['signup']['subject']; // $subject;
|
||||
$ret['subject'] = $EMAIL_TEMPLATE['signup']['subject']; // $subject;
|
||||
$ret['send_html'] = TRUE;
|
||||
$ret['shortcodes'] = $sc;
|
||||
|
||||
@ -1412,7 +1414,8 @@ class e_system_user extends e_user_model
|
||||
|
||||
$templateName = $ret['template'];
|
||||
|
||||
$ret['email_subject'] = varset($EMAIL_TEMPLATE[$templateName]['subject'], $EMAIL_TEMPLATE['default']['subject']) ; // $subject;
|
||||
// $ret['email_subject'] = varset($EMAIL_TEMPLATE[$templateName]['subject'], $EMAIL_TEMPLATE['default']['subject']) ; // $subject;
|
||||
$ret['subject'] = $userInfo['mail_subject'];
|
||||
$ret['e107_header'] = $userInfo['user_id'];
|
||||
|
||||
if (vartrue($userInfo['email_copy_to'])) { $ret['email_copy_to'] = $userInfo['email_copy_to']; }
|
||||
@ -1429,51 +1432,14 @@ class e_system_user extends e_user_model
|
||||
$sc['PASSWORD'] = vartrue($userInfo['user_password'], '***********');
|
||||
$sc['SUBJECT'] = $userInfo['mail_subject'];
|
||||
|
||||
|
||||
/*
|
||||
$search[0] = '{LOGINNAME}';
|
||||
$replace[0] = intval($pref['allowEmailLogin']) === 0 ? $userInfo['user_loginname'] : $userInfo['user_email'];
|
||||
|
||||
$search[1] = '{DISPLAYNAME}';
|
||||
$replace[1] = $userInfo['user_login'] ? $userInfo['user_login'] : $userInfo['user_name'];
|
||||
|
||||
$search[2] = '{EMAIL}';
|
||||
$replace[2] = $userInfo['user_email'];
|
||||
|
||||
$search[3] = '{SITENAME}';
|
||||
$replace[3] = SITENAME;
|
||||
|
||||
$search[4] = '{SITEURL}';
|
||||
$replace[4] = "<a href='".SITEURL."'>".SITEURL."</a>";
|
||||
|
||||
$search[5] = '{USERNAME}';
|
||||
$replace[5] = $userInfo['user_name'];
|
||||
|
||||
$search[6] = '{USERURL}';
|
||||
$replace[6] = vartrue($userInfo['user_website']) ? $userInfo['user_website'] : "";
|
||||
|
||||
$ret['email_subject'] = $subject; // str_replace($search, $replace, $subject); - performed in mail handler.
|
||||
|
||||
$search[7] = '{PASSWORD}';
|
||||
$replace[7] = $pass_show ? $pass_show : '******';
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if(isset($userInfo['activation_url']))
|
||||
{
|
||||
$sc['ACTIVATION_URL'] = $userInfo['activation_url'];
|
||||
$sc['ACTIVATION_LINK'] = strpos($userInfo['activation_url'], 'http') === 0 ? '<a href="'.$userInfo['activation_url'].'">'.$userInfo['activation_url'].'</a>' : $userInfo['activation_url'];
|
||||
|
||||
/*
|
||||
$search[8] = '{ACTIVATION_URL}';
|
||||
$replace[8] = $userInfo['activation_url'];
|
||||
|
||||
$search[9] = '{ACTIVATION_LINK}';
|
||||
$replace[9] = strpos($userInfo['activation_url'], 'http') === 0 ? '<a href="'.$userInfo['activation_url'].'">'.$userInfo['activation_url'].'</a>' : $userInfo['activation_url'];
|
||||
*/
|
||||
}
|
||||
|
||||
$ret['send_html'] = TRUE;
|
||||
$ret['send_html'] = true;
|
||||
$ret['email_body'] = $template; // e107::getParser()->parseTemplate(str_replace($search, $replace, $template)); - performed in mail handler.
|
||||
$ret['preview'] = $ret['mail_body']; // Non-standard field
|
||||
$ret['shortcodes'] = $sc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user