Skip to content

Commit

Permalink
Update auth.class.php
Browse files Browse the repository at this point in the history
moved text from mailer to language file
  • Loading branch information
mooztik committed May 25, 2015
1 parent 3d41c42 commit b3e1194
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions auth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,33 +665,13 @@ private function addRequest($uid, $email, $type)
$mail->isHTML(true);

if($type == "activation") {
$mail->Subject = "{$this->config->site_name} - Activate account";

$mail->Body = "Hello,<br/><br/>";
$mail->Body .= "To be able to log in to your account you first need to activate your account by clicking on the following link :<br/>";
$mail->Body .= "<strong><a href=\"{$this->config->site_url}/{$this->config->site_activation_page}\">{$this->config->site_url}/{$this->config->site_activation_page}</a></strong><br/><br/>";
$mail->Body .= "You then need to use the following activation key: <strong>{$key}</strong><br/><br/>";
$mail->Body .= "If you did not sign up on {$this->config->site_url} recently then this message was sent in error, please ignore it.";

$mail->AltBody = "Hello, \n\n";
$mail->AltBody .= "To be able to log in to your account you first need to activate your account by visiting the following link :\n";
$mail->AltBody .= "{$this->config->site_url}/{$this->config->site_activation_page}\n\n";
$mail->AltBody .= "You then need to use the following activation key: {$key}\n\n";
$mail->AltBody .= "If you did not sign up on {$this->config->site_url} recently then this message was sent in error, please ignore it.";
$mail->Subject = sprintf($this->lang['email_activation_subject'], $this->config->site_name);
$mail->Body = sprintf($this->$lang['email_activation_body'], $this->config->site_url, $this->config->site_activation_page, $key);
$mail->AltBody = sprintf($this->$lang['email_activation_altbody'], $this->config->site_url, $this->config->site_activation_page, $key);
} else {
$mail->Subject = "{$this->config->site_name} - Password reset request";

$mail->Body = "Hello,<br/><br/>";
$mail->Body .= "To reset your password click the following link :<br/><br/>";
$mail->Body .= "<strong><a href=\"{$this->config->site_url}/{$this->config->site_password_reset_page}\">{$this->config->site_url}/{$this->config->site_password_reset_page}</a></strong><br/><br/>";
$mail->Body .= "You then need to use the following password reset key: <strong>{$key}</strong><br/><br/>";
$mail->Body .= "If you did not request a password reset key on {$this->config->site_url} recently then this message was sent in error, please ignore it.";

$mail->AltBody = "Hello, \n\n";
$mail->AltBody .= "To reset your password please visiting the following link :\n";
$mail->AltBody .= "{$this->config->site_url}/{$this->config->site_password_reset_page}\n\n";
$mail->AltBody .= "You then need to use the following password reset key: {$key}\n\n";
$mail->AltBody .= "If you did not request a password reset key on {$this->config->site_url} recently then this message was sent in error, please ignore it.";
$mail->Subject = sprintf($this->lang['email_reset_subject'], $this->config->site_name);
$mail->Body = sprintf($this->$lang['email_reset_body'], $this->config->site_url, $this->config->site_activation_page, $key);
$mail->AltBody = sprintf($this->$lang['email_reset_altbody'], $this->config->site_url, $this->config->site_activation_page, $key);
}

if(!$mail->send()) {
Expand Down

0 comments on commit b3e1194

Please sign in to comment.