The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Forgot Password Errors - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Forgot Password Errors (/showthread.php?tid=313)



Forgot Password Errors - mediagrind - Sep 30th, 2009

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:
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


RE: Forgot Password Errors - Ben - Oct 3rd, 2009

Hey Matt,

Thanks for the heads up! I've posted this as a bug here:
http://bugs.formtools.org/index.php?cmd=view&id=148

I'll fix it in the next release of the module. Thanks for posting your code!

- Ben