Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Issue with Website Membership

 

 


mattbcd
User

Jan 23, 2012, 4:04 PM

Post #1 of 5 (787 views)
Shortcut
Issue with Website Membership Can't Post

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?


Jason
Staff / Moderator


Jan 24, 2012, 10:02 AM

Post #2 of 5 (777 views)
Shortcut
Re: [mattbcd] Issue with Website Membership [In reply to] Can't Post

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:


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


That should eliminate the "Undefined variable" error.

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/ 


mattbcd
User

Jan 24, 2012, 12:16 PM

Post #3 of 5 (769 views)
Shortcut
Re: [Jason] Issue with Website Membership [In reply to] Can't Post

Hi. I now get a different error:

Mail Error: Undefined index: disabled

Again, any help hugely appreciated.


Jason
Staff / Moderator


Jan 25, 2012, 1:00 PM

Post #4 of 5 (732 views)
Shortcut
Re: [mattbcd] Issue with Website Membership [In reply to] Can't Post

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:


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


This seems to have gotten rid of the issue.

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/ 


mattbcd
User

Jan 26, 2012, 6:39 AM

Post #5 of 5 (717 views)
Shortcut
Re: [Jason] Issue with Website Membership [In reply to] Can't Post

Fantastic. Did the trick. Many thanks Jason.