1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Fix for signup template constants under CLI (scheduled task)

This commit is contained in:
Cameron
2015-05-16 23:59:43 -07:00
parent bb69e95346
commit 686c7187ff
3 changed files with 12 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ if (!getperms('W'))
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_mailout.php');
e107::lan('core','signup');
// e107::lan('core','signup');
require_once(e_HANDLER.'ren_help.php');

View File

@@ -1914,8 +1914,9 @@ class users_admin_ui extends e_admin_ui
if(!$sql2->update('user',$updateQry))
{
echo "error updating user's password";
print_a($updateQry);
e107::getMessage()->addError("Error updating user's password. #".$row['user_id']." : ".$row['user_email']);
e107::getMessage()->addDebug(print_a($updateQry,true));
// break;
}
@@ -1933,6 +1934,9 @@ class users_admin_ui extends e_admin_ui
$rawPassword = '(*** hidden ***)';
}
$activationUrl = SITEURL."signup.php?activate.".$row['user_id'].".".$row['user_sess'];
$recipients[] = array(
'mail_recipient_id' => $row['user_id'],
@@ -1946,9 +1950,11 @@ class users_admin_ui extends e_admin_ui
'SUBJECT' => LAN_SIGNUP_98,
'USERNAME' => $row['user_name'],
'USERLASTVISIT' => $row['user_lastvisit'],
'ACTIVATION_LINK' => SITEURL."signup.php?activate.".$row['user_id'].".".$row['user_sess'],
'ACTIVATION_LINK' => "<a href='".$activationUrl."'>".$activationUrl."</a>",
'ACTIVATION_URL' => $activationUrl,
'DATE_SHORT' => $tp->toDate(time(),'short'),
'DATE_LONG' => $tp->toDate(time(),'long'),
'SITEURL' => SITEURL
)
);

View File

@@ -38,6 +38,7 @@ See e_HANDLER.mail.php for more information
if (!defined('e107_INIT')) { exit; }
$includeSiteButton = e107::getPref('sitebutton');
e107::lan('core','signup'); // required for when mailer runs under CLI.
/*
$SIGNUPEMAIL_SUBJECT = LAN_SIGNUP_96.' {SITENAME}';
@@ -181,8 +182,8 @@ $EMAIL_TEMPLATE['signup']['footer'] = "</div>
$EMAIL_TEMPLATE['signup']['cc'] = "";
$EMAIL_TEMPLATE['signup']['bcc'] = "";
$EMAIL_TEMPLATE['signup']['attachments'] = "";
$EMAIL_TEMPLATE['signup']['include'] = "{e_LANGUAGEDIR}{e_LANGUAGE}/lan_signup.php";
//TODO FIXME {SITEBUTTON} not working at the moment. (broken path)
// -----------------------------