Comment 1 for bug 515497

Revision history for this message
Matteo (matteo-scaramuccia) wrote :

Call stack (most recent first):

    * log_message("Undefined variable: usertoname", 8, true, true, "C:\path\to\mahara-1.2.2\htdocs\lib\user.php", 401) at C:\path\to\mahara-1.2.2\htdocs\lib\errors.php:446
    * error(8, "Undefined variable: usertoname", "C:\path\to\mahara-1.2.2\htdocs\lib\user.php", 401, array(size 14)) at C:\path\to\mahara-1.2.2\htdocs\lib\user.php:401
    * email_user(object(stdClass), null, "Username/Password details for Mahara", "Dear Admin User, A username/password request ha...", "<p>Dear Admin User,</p> <p>A username/password ...") at C:\path\to\mahara-1.2.2\htdocs\forgotpass.php:167
    * forgotpass_submit(object(Pieform), array(size 3)) at Unknown:0
    * call_user_func_array("forgotpass_submit", array(size 2)) at C:\path\to\mahara-1.2.2\htdocs\lib\pieforms\pieform.php:430
    * Pieform->__construct(array(size 5)) at C:\path\to\mahara-1.2.2\htdocs\lib\pieforms\pieform.php:170
    * Pieform::process(array(size 5)) at C:\path\to\mahara-1.2.2\htdocs\lib\pieforms\pieform.php:71
    * pieform(array(size 5)) at C:\path\to\mahara-1.2.2\htdocs\forgotpass.php:221

Patch proposal:

--- C:\path\to\mahara-1.2.2/htdocs/lib/user.php.orig Tue Dec 8 04:52:58 2009
+++ C:\path\to\mahara-1.2.2/htdocs/lib/user.php Mon Feb 1 15:09:18 2010
@@ -367,6 +367,7 @@

     $mail->Subject = substr(stripslashes($subject), 0, 900);

+ $usertoname = $userto->username . '(' . $userto->email . ')';
     if ($to = get_config('sendallemailto')) {
         // Admins can configure the system to send all email to a given address
         // instead of whoever would receive it, useful for debugging.