Issue with Website Membership

By mattbcd - January 23, 2012

Hi. I've set up a membership login/register form here: http://www.vaccinelearningzone.com/login/signup.php

When you hit submit, you get the following error:

Notice: Undefined variable: errors in /content/Hosting/v/a/vaccinelearningzone.com/web/login/user-signup.php on line 90 Mail Error:

which equates to this line:

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

from this section:

// send message
$emailTemplate = "/emails/new_signup.php";
$emailHeaders = emailTemplate_load(array(
'template' => websiteLogin_pluginDir() . "/$emailTemplate",
'subject' => '', // set in template
'from' => '', // set in template
'to' => $_REQUEST['email'],
'placeholders' => array(
'username' => array_key_exists('username', $_REQUEST) ? $_REQUEST['username'] : $_REQUEST['email'], // if using email as username then show that instead
'password' => $password,
'loginUrl' => "http://" . $_SERVER['HTTP_HOST'] . $GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'],
),
));
$mailErrors = sendMessage($emailHeaders);
if ($mailErrors) { die("Mail Error: $errors"); }

As far as I can tell, I've got all the paths correct, haven't deleted anything important and the file http://www.vaccinelearningzone.com/cms/plugins/emails/new_signup.php is functioning correctly.

The account gets created, the registration confirmation email gets sent, but this error prevents going on to the post login URL.

Do you have any ideas what's going wrong?

Re: [mattbcd] Issue with Website Membership

By Jason - January 24, 2012

Hi,

This issue is actually a typo that was in an older version of the website membership plugin sign up form.

What you need to do is change $errors to $mailErrors like this:

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

That should eliminate the "Undefined variable" error.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Issue with Website Membership

By mattbcd - January 24, 2012

Hi. I now get a different error:

Mail Error: Undefined index: disabled

Again, any help hugely appreciated.

Re: [mattbcd] Issue with Website Membership

By Jason - January 25, 2012

Hi,

It looks like an issue where you're server is outputting an error that should have been suppressed through code.

I added this line to your user-signup.php page:

$emailHeaders['disabled'] = false;
$mailErrors = sendMessage($emailHeaders);


This seems to have gotten rid of the issue.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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