Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
password reminder not working after cms upgrade

 

 


4cdg
User

Sep 8, 2011, 7:59 AM

Post #1 of 8 (2436 views)
Shortcut
password reminder not working after cms upgrade Can't Post

I had password reminder page setup and working at this link www.stoddardmls.com/pw_remind.php I copied the code directly from user-password-request.php in membership module.

I had to upgrade my cms to 2.12 and now when I submit password reminder it gives me this error message.

Notice: Undefined variable: errors in /usr/local/www/stoddardmls.com/pw_remind.php on line 51 Mail Error:


robin
User / Moderator


Sep 8, 2011, 9:51 AM

Post #2 of 8 (2431 views)
Shortcut
Re: [4cdg] password reminder not working after cms upgrade [In reply to] Can't Post

Hey,

Does it still send the reminder even with the error? Could you post the part of the code that is generating the error and we'll take a look?

Thanks,
Robin


4cdg
User

Sep 8, 2011, 10:13 AM

Post #3 of 8 (2429 views)
Shortcut
Re: [robin] password reminder not working after cms upgrade [In reply to] Can't Post

i does still send the email.

I am not sure what part of code is causing error, it says line 51 in error message, I haven't changed anything from the example that comes with the plugin. I attached the document to the last message, here is what lines 38 to 52 look like

$emailTemplate = "emails/user-password-request.php";
$emailHeaders = emailTemplate_load(array(
'template' => websiteLogin_pluginDir() . "/$emailTemplate",
'subject' => '', // set in template
'from' => '', // set in template
'to' => $user['email'],
'placeholders' => array(
'username' => $user['username'],
'loginUrl' => "http://" . $_SERVER['HTTP_HOST'] . $GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'],
'resetUrl' => "http://" . $_SERVER['HTTP_HOST'] . $GLOBALS['WEBSITE_LOGIN_RESET_URL'] . $resetQuery,
),
));
$mailErrors = sendMessage($emailHeaders);
if ($mailErrors) { die("Mail Error: $errors"); }


Jason
Staff / Moderator


Sep 9, 2011, 9:38 AM

Post #4 of 8 (2424 views)
Shortcut
Re: [4cdg] password reminder not working after cms upgrade [In reply to] Can't Post

Hi,

It looks like the wrong variable is being used on that last line, try changing this:


Code
if ($mailErrors) { die("Mail Error: $errors"); }


to this

Code
if ($mailErrors) { die("Mail Error: $mailErrors"); }


Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


4cdg
User

Sep 9, 2011, 9:42 AM

Post #5 of 8 (2423 views)
Shortcut
Re: [Jason] password reminder not working after cms upgrade [In reply to] Can't Post

made that change, now i get this error when i submit the request

Mail Error: Undefined index: disabled


robin
User / Moderator


Sep 9, 2011, 9:50 AM

Post #6 of 8 (2419 views)
Shortcut
Re: [4cdg] password reminder not working after cms upgrade [In reply to] Can't Post

Hey,

Looks like you're running into this problem now:
http://www.interactivetools.com/forum/gforum.cgi?post=89903;#89903

Hope that helps,
Robin


4cdg
User

Sep 9, 2011, 10:08 AM

Post #7 of 8 (2416 views)
Shortcut
Re: [robin] password reminder not working after cms upgrade [In reply to] Can't Post

that fixed it.

thanks guys


nmsinc
User

Sep 28, 2011, 2:58 PM

Post #8 of 8 (2320 views)
Shortcut
Re: [4cdg] password reminder not working after cms upgrade [In reply to] Can't Post

Had the same issue and your suggestion fixed it!

Thanks