mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 00:54:49 +02:00
Fix for resending a single re-activation email when password-input is disabled during signup (ie. auto-generated)
This commit is contained in:
@@ -1034,7 +1034,7 @@ class users_admin_ui extends e_admin_ui
|
||||
*/
|
||||
protected function resendActivation($id, $lfile = '')
|
||||
{
|
||||
$admin_log = e107::getAdminLog();
|
||||
|
||||
$sysuser = e107::getSystemUser($id, false);
|
||||
$key = $sysuser->getValue('sess');
|
||||
$mes = e107::getMessage();
|
||||
@@ -1075,17 +1075,37 @@ class users_admin_ui extends e_admin_ui
|
||||
// FIXME switch to e107::getUrl()->create(), use email content templates
|
||||
//$return_address = (substr(SITEURL,- 1) == "/") ? SITEURL."signup.php?activate.".$sysuser->getId().".".$key : SITEURL."/signup.php?activate.".$sysuser->getId().".".$key;
|
||||
$return_address = SITEURL."signup.php?activate.".$sysuser->getId().".".$key;
|
||||
$message = LAN_EMAIL_01." ".$sysuser->getName()."\n\n".LAN_SIGNUP_24." ".SITENAME.".\n".LAN_SIGNUP_21."\n\n";
|
||||
$message .= "<a href='".$return_address."'>".$return_address."</a>";
|
||||
// $message = LAN_EMAIL_01." ".$sysuser->getName()."\n\n".LAN_SIGNUP_24." ".SITENAME.".\n".LAN_SIGNUP_21."\n\n";
|
||||
// $message .= "<a href='".$return_address."'>".$return_address."</a>";
|
||||
|
||||
// custom header now auto-added in email() method
|
||||
//$mailheader_e107id = $id;
|
||||
|
||||
|
||||
$userInfo = array(
|
||||
'user_id' => $sysuser->getId(),
|
||||
'user_name' => $sysuser->getName(),
|
||||
'user_email' => $sysuser->getValue('email'),
|
||||
'user_sess' => $key,
|
||||
'user_loginname' => $sysuser->getValue('loginname'),
|
||||
);
|
||||
|
||||
|
||||
$passwordInput = e107::getPref('signup_option_password', 2);
|
||||
|
||||
if(empty($passwordInput)) // auto-generated password at signup.
|
||||
{
|
||||
$newPwd = e107::getUserSession()->resetPassword($userInfo['user_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newPwd = '**********';
|
||||
}
|
||||
|
||||
$message = 'null';
|
||||
|
||||
$check = $sysuser->email('email', array(
|
||||
'mail_subject' => LAN_SIGNUP_96." ".SITENAME,
|
||||
$check = $sysuser->email('signup', array(
|
||||
'mail_subject' => LAN_SIGNUP_98,
|
||||
'mail_body' => nl2br($message),
|
||||
));
|
||||
'user_password' => $newPwd
|
||||
), $userInfo);
|
||||
|
||||
if ($check)
|
||||
{
|
||||
@@ -1835,7 +1855,7 @@ class users_admin_ui extends e_admin_ui
|
||||
$tp = e107::getParser();
|
||||
|
||||
$age = array(
|
||||
3=>'3 hours', 6=> "6 hours", 12=>'12 hours', 24 => "24 hours", 48 => '48 hours', 72 => '3 days'
|
||||
1=>'1 hour', 3=>'3 hours', 6=> "6 hours", 12=>'12 hours', 24 => "24 hours", 48 => '48 hours', 72 => '3 days'
|
||||
);
|
||||
|
||||
$count = $sql->count('user','(*)',"user_ban = 2 ");
|
||||
|
@@ -32,7 +32,7 @@ class e107Bounce
|
||||
{
|
||||
if(ADMIN && vartrue($_GET['eml']))
|
||||
{
|
||||
$this->debug = true;
|
||||
$this->debug = 2; // mode2 - via browser for admin.
|
||||
$this->source = $_GET['eml'].".eml";
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class e107Bounce
|
||||
|
||||
if(strpos($strEmail,'X-Bounce-Test: true')!==false) // Bounce Test from Admin Area.
|
||||
{
|
||||
$this->debug = true;
|
||||
$this->debug = true; // mode 1 - for email test.
|
||||
}
|
||||
|
||||
if(empty($strEmail)) // Failed.
|
||||
@@ -109,7 +109,7 @@ class e107Bounce
|
||||
{
|
||||
if($errors = $this->setUser_Bounced($e107_userid))
|
||||
{
|
||||
if($this->debug)
|
||||
if($this->debug === 2)
|
||||
{
|
||||
echo "<h3>Errors</h3>";
|
||||
print_a($errors);
|
||||
@@ -207,7 +207,9 @@ class e107Bounce
|
||||
|
||||
$mailManager = e107::getBulkEmail();
|
||||
|
||||
$mailManager->controlDebug($this->debug);
|
||||
$debug = ($this->debug === 2) ? true : false;
|
||||
|
||||
$mailManager->controlDebug($debug);
|
||||
|
||||
if ($errors = $mailManager->markBounce($bounceString, $email))
|
||||
{
|
||||
|
@@ -1264,7 +1264,13 @@ class e_system_user extends e_user_model
|
||||
elseif (vartrue($EMAIL_TEMPLATE['signup']['attachments'])) { $ret['email_attach'] = $EMAIL_TEMPLATE['signup']['attachments']; }
|
||||
|
||||
$style = vartrue($SIGNUPEMAIL_LINKSTYLE) ? "style='{$SIGNUPEMAIL_LINKSTYLE}'" : "";
|
||||
|
||||
|
||||
|
||||
if(empty($userInfo['activation_url']) && !empty($userInfo['user_sess']) && !empty($userInfo['user_id']))
|
||||
{
|
||||
$userInfo['activation_url'] = SITEURL."signup.php?activate.".$userInfo['user_id'].".".$userInfo['user_sess'];
|
||||
}
|
||||
|
||||
|
||||
$sc = array();
|
||||
|
||||
|
Reference in New Issue
Block a user