reworked registration email; fixes #62

This commit is contained in:
following
2013-07-14 21:34:15 +02:00
parent 2bb6758232
commit 376401d416
5 changed files with 70 additions and 61 deletions
+3 -3
View File
@@ -163,11 +163,11 @@ function configure_php()
function set_domain()
{
global $opt;
if (!isset($opt['domain']))
return;
$domain = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
if ($domain == '')
$opt['page']['domain'] = $domain;
if (!isset($opt['domain']) || $domain == '')
return;
if (isset($opt['domain'][$domain]))
+6 -1
View File
@@ -435,6 +435,8 @@ class user
if ($this->reUser->save())
{
if ($this->getUserId() == ID_NEW)
$this->nUserId = $this->reUser->getValue('user_id');
$this->getStatpic()->invalidate();
sql_slave_exclude();
return true;
@@ -583,7 +585,7 @@ class user
function sendRegistrationCode()
{
global $translate;
global $opt, $translate;
$countriesList = new countriesList();
@@ -591,7 +593,10 @@ class user
$mail->name = 'register';
$mail->to = $this->getEMail();
$mail->subject = $translate->t('Registration confirmation', '', basename(__FILE__), __LINE__);
$mail->assign('domain', $opt['page']['domain']);
$mail->assign('activation_page', $opt['page']['absolute_url'] . 'activation.php');
$mail->assign('username', $this->getUsername());
$mail->assign('userid', $this->getUserId());
$mail->assign('last_name', $this->getLastName());
$mail->assign('first_name', $this->getFirstName());
$mail->assign('country', $countriesList->getCountryLocaleName($this->getCountryCode()));