Sep 30th, 2009, 12:48 PM
(This post was last modified: Sep 30th, 2009, 12:49 PM by mediagrind.)
The Forgot Password page through the Submission Accounts module was erroring out when my users were trying to retrieve their login passwords. It could not figure out undefined variables for the $success and $messages fields that are generated based on if the email is sent or not. I went into the following page submission_accounts/global/code/users.php and modified the last few lines of code on or around line 296. Seems to work fine now.
Changed from:
Replace With:
This is a patch that seems to work on my system. I cannot guarantee it will resolve all issues with the Forgot Password page, so remember to backup your files before attempting to use this solution.
Matt
Changed from:
Code:
if (!@mail("$email", $email_subject, $email_content))
{
$success = false;
$message = $LANG["notify_email_not_sent"];
return array($success, $message);
}
return array($success, $message);
}
Replace With:
Code:
// some systems fail without it]
if (!@mail("$email", $email_subject, $email_content))
{
$success = false;
$message = $LANG["notify_email_not_sent"];
return array($success, $message);
}
else if (
@mail("$email", $email_subject, $email_content))
{
$success = true;
$message = $LANG["notify_email_sent"];
return array($success, $message);
}
This is a patch that seems to work on my system. I cannot guarantee it will resolve all issues with the Forgot Password page, so remember to backup your files before attempting to use this solution.
Matt