Fix the password reset email system
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 31 Aug 2008 15:39:54 +0000 (11:39 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 31 Aug 2008 15:39:54 +0000 (11:39 -0400)
includes/api_user.php
login.php
templates/passwordreset.tpl

index acc45f7d1b1c441289b166d4e54b36f79dbc0259..6f8d9d9a532be41f355372677ddd001de28da9aa 100644 (file)
@@ -225,7 +225,7 @@ class UserAPI extends BSApi
        */
        function pre_update()
        {
-               $this->set_condition();
+               $this->setCondition();
                $this->fetch();
                
                if ($this->values['password'] == '')
index 30d9ba3094efc9755d160e9af9cd49c161c1fb02..6d59c92f1fa836135c5f1a84681bea2af5bf0408 100755 (executable)
--- 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']));
index f0024916a78c25a1cbc862afcd6b5c12e4eaabfc..508bd3a4261ea0e15d2fc3557a036b6f38de0123 100644 (file)
@@ -40,4 +40,4 @@
 
 </form>
 
-$footer
\ No newline at end of file
+<%- $footer %>
\ No newline at end of file