From 50fa4cba69848ad863c9f316fbe206c26a6521f6 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 31 Aug 2008 11:39:54 -0400 Subject: [PATCH] Fix the password reset email system --- includes/api_user.php | 2 +- login.php | 4 +++- templates/passwordreset.tpl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/api_user.php b/includes/api_user.php index acc45f7..6f8d9d9 100644 --- a/includes/api_user.php +++ b/includes/api_user.php @@ -225,7 +225,7 @@ class UserAPI extends BSApi */ function pre_update() { - $this->set_condition(); + $this->setCondition(); $this->fetch(); if ($this->values['password'] == '') diff --git a/login.php b/login.php index 30d9ba3..6d59c92 100755 --- a/login.php +++ b/login.php @@ -121,7 +121,9 @@ if ($_POST['do'] == 'sendpw') $email = get_email_text('password_reset'); $mail = new BSMail(); $mail->setSubject($email['subject']); - $mail->setBodyText(sprintf($email['subject'], $user->record['displayname'], bugdar::$options['trackertitle'], bugdar::$options['trackerurl'], $activator)); + $mail->setBodyText(sprintf($email['bodyText'], $user->record['displayname'], bugdar::$options['trackertitle'], bugdar::$options['trackerurl'], $activator)); + $mail->setFromAddress(MAIL_FROM_ADDRESS); + $mail->setFromName(MAIL_FROM_NAME); $mail->send($user->record['email'], $user->record['displayname']); $message->message(sprintf(T('An email has been dispatched to %1$s that contains instructions on how to reset your password.'), $user->record['email'])); diff --git a/templates/passwordreset.tpl b/templates/passwordreset.tpl index f002491..508bd3a 100644 --- a/templates/passwordreset.tpl +++ b/templates/passwordreset.tpl @@ -40,4 +40,4 @@ -$footer \ No newline at end of file +<%- $footer %> \ No newline at end of file -- 2.22.5