Skip to content
Browse files

fixed email body creation for notifications

  • Loading branch information...
1 parent 578cd2d commit 107ffeb5b3c1d6923cbc50316da78c6f44aac0f8 @everzet committed
View
8 lib/actions/sfObjectGuardPasswordAction.class.php
@@ -45,16 +45,16 @@ protected function generateTemporaryPassword($length = 8)
return $password;
}
- protected function getActivationMailMessage($email, $activation, $password)
+ protected function getActivationMailMessage(sfObjectGuardUser $user, $activation, $password)
{
return Swift_Message::newInstance()
->setFrom(sfConfig::get('app_robot_mail_address'))
- ->setTo($email)
+ ->setTo($user->getEmail())
->setSubject($this->getPartial('mailNotificationSubject'))
->setBody($this->getPartial('mailNotificationBody', array(
- 'email' => $email,
+ 'user' => $user,
'key' => $activation,
'password' => $password
)));
}
-}
+}
View
2 lib/security/sfObjectGuardBasicSecurityFilter.class.php
@@ -98,4 +98,4 @@ protected function getUserCredential()
return $credential;
}
-}
+}
View
2 modules/sfObjectGuardInvite/lib/BasesfObjectGuardInviteAction.class.php
@@ -53,7 +53,7 @@ public function execute($request)
// invite sending
$this->getMailer()->send($this->getActivationMailMessage(
- $user->getEmail(), $inviteKey->getActivationKey(), $password
+ $user, $inviteKey->getActivationKey(), $password
));
// if we not in dev environment - redirect
View
4 modules/sfObjectGuardInvite/templates/_mailNotificationBody.php
@@ -3,5 +3,5 @@
<?php echo __('Go to the following link to finish registration:') ?>
<?php echo link_to('activate', '@sf_object_guard_activate?activation_key=' . $key, 'absolute=true') ?>
-<?php echo __('Your email:') ?> "<?php echo $email ?>"
-<?php echo __('Your temporary password:') ?> "<?php echo $password ?>"
+<?php echo __('Your email:') ?> "<?php echo $user->getEmail() ?>"
+<?php echo __('Your temporary password:') ?> "<?php echo $password ?>"
View
2 modules/sfObjectGuardPasswordRemind/lib/BasesfObjectGuardPasswordRemindAction.class.php
@@ -52,7 +52,7 @@ public function execute($request)
// remind key sending
$this->getMailer()->send($this->getActivationMailMessage(
- $user->getEmail(), $passwordKey->getActivationKey(), $password
+ $user, $passwordKey->getActivationKey(), $password
));
$this->remindSuccess($user);
View
4 modules/sfObjectGuardPasswordRemind/templates/_mailNotificationBody.php
@@ -3,5 +3,5 @@
<?php echo __('Go to the following link to proceed with password change:') ?>
<?php echo link_to('activate', '@sf_object_guard_activate?activation_key=' . $key, 'absolute=true') ?>
-<?php echo __('Your email:') ?> "<?php echo $email ?>"
-<?php echo __('Your new password:') ?> "<?php echo $password ?>"
+<?php echo __('Your email:') ?> "<?php echo $user->getEmail() ?>"
+<?php echo __('Your new password:') ?> "<?php echo $password ?>"
View
2 modules/sfObjectGuardRegister/lib/BasesfObjectGuardRegisterAction.class.php
@@ -50,7 +50,7 @@ public function execute($request)
// activation key sending
$this->getMailer()->send($this->getActivationMailMessage(
- $user->getEmail(), $activationKey->getActivationKey(), $password
+ $user, $activationKey->getActivationKey(), $password
));
$this->registerSuccess($user);
View
4 modules/sfObjectGuardRegister/templates/_mailNotificationBody.php
@@ -3,5 +3,5 @@
<?php echo __('Go to the following link to finish registration:') ?>
<?php echo link_to('activate', '@sf_object_guard_activate?activation_key=' . $key, 'absolute=true') ?>
-<?php echo __('Your email:') ?> "<?php echo $email ?>"
-<?php echo __('Your temporary password:') ?> "<?php echo $password ?>"
+<?php echo __('Your email:') ?> "<?php echo $user->getEmail() ?>"
+<?php echo __('Your temporary password:') ?> "<?php echo $password ?>"

0 comments on commit 107ffeb

Please sign in to comment.
Something went wrong with that request. Please try again.