Permalink
Browse files

Fix links in email.

  • Loading branch information...
1 parent 4511e78 commit b04c644b42f7151b527adb487a076da88a22af0e @tungtt tungtt committed Apr 18, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 protected/modules/user/models/User.php
@@ -184,9 +184,9 @@ public static function sendRegisterVerification($email, $username)
'subject' => 'LintinZone ' . UserModule::t('Xác nhận đăng ký thành viên'),
'body' => array(
'{receiver}' => (empty($username)) ? UserModule::t('my friend') : $username, // username
- '{confirm_link}' => 'http://' . $_SERVER['SERVER_NAME'] . '/beta/user/registration/confirm?key=' . $key . '&email=' . $email,
- '{support_link}' => 'http://' . $_SERVER['SERVER_NAME'] . '/beta/site/contact?email=' . $email,
- '{home_link}' => 'http://' . $_SERVER['SERVER_NAME'] . '/beta/'
+ '{confirm_link}' => Yii::app()->createAbsoluteUrl('user/registration/confirm', array('key' => $key, 'email' => $email)),
+ '{support_link}' => Yii::app()->createAbsoluteUrl('site/contact', array('email' => $email)),
+ '{home_link}' => Yii::app()->createAbsoluteUrl('')
)
);
if (MailSender::sendSMTP($mailParams, 'register', 'text/html'))
@@ -218,9 +218,9 @@ public static function sendRegisterVerification($email, $username)
'subject' => 'LintinZone ' . UserModule::t('Xác nhận đăng ký thành viên'),
'body' => array(
'{receiver}' => (empty($username)) ? UserModule::t('my friend') : $username, // username
- '{confirm_link}' => 'http://' . $_SERVER['SERVER_NAME'] . 'beta/user/registration/confirm?key=' . $key . '&email=' . $email,
- '{support_link}' => 'http://' . $_SERVER['SERVER_NAME'] . 'beta/site/contact?email=' . $email,
- '{home_link}' => 'http://' . $_SERVER['SERVER_NAME'] . '/beta/'
+ '{confirm_link}' => Yii::app()->createAbsoluteUrl('user/registration/confirm', array('key' => $key, 'email' => $email)),
+ '{support_link}' => Yii::app()->createAbsoluteUrl('site/contact', array('email' => $email)),
+ '{home_link}' => Yii::app()->createAbsoluteUrl('')
)
);
if (MailSender::sendSMTP($mailParams, 'register', 'text/html'))

0 comments on commit b04c644

Please sign in to comment.