Clean up and bugfixes for password reset (SAAS-1009)

This commit is contained in:
Albert Santoni 2015-08-07 13:57:42 -04:00
parent ea86675d07
commit ea2a6b3f68
9 changed files with 105 additions and 72 deletions

View file

@ -30,10 +30,12 @@ class Application_Model_Auth
$e_link_port = $_SERVER['SERVER_PORT'];
$e_link_path = $view->url(array('user_id' => $user->getDbId(), 'token' => $token), 'password-change');
$message = sprintf(_("Hi %s, \n\nClick this link to reset your password: "), $user->getDbLogin());
$message = sprintf(_("Hi %s, \n\nPlease click this link to reset your password: "), $user->getDbLogin());
$message .= "{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
$message .= sprintf(_pro("\n\nIf you have any problems, please contact our support team: %s"), SUPPORT_EMAIL_ADDRESS);
$message .= sprintf(_pro("\n\nThank you, The %s Team"), SAAS_PRODUCT_BRANDING_NAME);
$str = sprintf(_('%s Password Reset'), PRODUCT_NAME);
$str = sprintf(_('%s Password Reset'), SAAS_PRODUCT_BRANDING_NAME);
return Application_Model_Email::send($str, $message, $user->getDbEmail());
}

View file

@ -13,7 +13,7 @@ class Application_Model_Email
*/
public static function send($subject, $message, $to) {
$headers = 'From: Airtime <noreply@account.sourcefabric.com>';
$headers = sprintf('From: %s <noreply@account.sourcefabric.com>', SAAS_PRODUCT_BRANDING_NAME);
return mail($to, $subject, $message, $headers);
}