Undefined variable: usertoname, when trying to recover your forgotten password
Bug #515497 reported by
Matteo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Undecided
|
Richard Mansfield |
Bug Description
Mahara 1.2.2 (vanilla)
WAMP, PHP 5.2.12
MySQL
If for some reason the mail function will silently (due to the "@" in mail() call) fail an exception will be thrown.
The reason of the mail failure is e.g. wrong relay settings.
Changed in mahara: | |
assignee: | nobody → Richard Mansfield (richard-mansfield) |
Changed in mahara: | |
milestone: | none → 1.2.3 |
status: | New → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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 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 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 submit( object( Pieform) , array(size 3)) at Unknown:0 func_array( "forgotpass_ submit" , array(size 2)) at C:\path\ to\mahara- 1.2.2\htdocs\ lib\pieforms\ pieform. php:430 >__construct( array(size 5)) at C:\path\ to\mahara- 1.2.2\htdocs\ lib\pieforms\ pieform. php:170 :process( array(size 5)) at C:\path\ to\mahara- 1.2.2\htdocs\ lib\pieforms\ pieform. php:71 to\mahara- 1.2.2\htdocs\ forgotpass. php:221
* error(8, "Undefined variable: usertoname", "C:\path\
* email_user(
* forgotpass_
* call_user_
* Pieform-
* Pieform:
* pieform(array(size 5)) at C:\path\
Patch proposal:
--- C:\path\ to\mahara- 1.2.2/htdocs/ lib/user. php.orig Tue Dec 8 04:52:58 2009 to\mahara- 1.2.2/htdocs/ lib/user. php Mon Feb 1 15:09:18 2010
+++ C:\path\
@@ -367,6 +367,7 @@
$mail->Subject = substr( stripslashes( $subject) , 0, 900);
+ $usertoname = $userto->username . '(' . $userto->email . ')'; 'sendallemailto ')) {
if ($to = get_config(
// Admins can configure the system to send all email to a given address
// instead of whoever would receive it, useful for debugging.