Email New Account Notification - setup question

By csdesign - October 14, 2013

Hello! 

I have just added the Email New Account Notification plugin:
http://www.interactivetools.com/add-ons/detail.php?Email-New-Account-Notification-1037

The plug-in is installed and showing on the User Accounts page but I'm stuck on the very last part: 

Two global variables must be set to customize the plugin for your site. They are for membership link for membership login page and the text that will be used for this link.

Can anyone help me with this? The membership plugin has been installed and works perfect.  I have a membership login page (user-login.php)

I've attached the original user-login.php page for reference. 

Thanks so much for the help!! 

Attachments:

user-login_001.php 4K

By csdesign - October 18, 2013

oh geez.. yes, that would have been a great place to look! ;) thank you.  I just posted my other tech issue concerning the Membership Plugin. If that one can be fixed - then I could just ditch this one and save some time. 

So, I changed the globals in the "gl_emailnewAccountActivated.php" plugin to: 

$GLOBALS['GL_ENA_LINK_NAME'] = 'email account activated';  // the link name in the list
$GLOBALS['GL_ENA_MEMBER_LOGIN_LINK'] = 'http://www.superiorequinesires.com/cmsAdmin/admin.php'; // membership link used in email
$GLOBALS['GL_ENA_MEMBER_LOGIN_LINK_TEXT'] = 'Your membership is complete! You may now create your own conception reports!'; // membership link text used in email

Just for good measure... and because I wasn't sure. I also added them to the user-login.php page.  However, still getting this error upon clicking on "email account activated" text in the user accounts. 

MySQL Error: Unknown column 'firstName' in 'field list' (at old_alias_functions.php line 20 in function mysql_select_query)

This is line 20 in old_alias_functions.php:

function mysql_query_fetch_all_assoc($query) { return mysql_select_query($query); }

I see that the User Account Section Editor uses "fullname", not "firstName". Is that the issue? I changed all the references for "firstName" to "fullname"  in "gl_emailnewAccountActivated.php" which then produced this error below. So I switched both instances back to "firstName". 

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM cms_accounts WHERE num = '35'' at line 1 (at old_alias_functions.php line 20 in function mysql_select_query)

I've attached the gl_emailnewAccountActivated.php just in case that helps. Thanks !! Tina

By ross - October 22, 2013

Hi Tina

Thanks for the update!

Had a look through your code and I have an idea of what's happening.  First though, you are on the right track with changing firstName to fullname; that was definitely a problem.  The new error you are getting is related to the extra single quote after the num = '35' part:

'FROM cms_accounts WHERE num = '35''

You can see the extra single quote there. To track this down, I found in the plugin where that SQL query is created:

 $query  = "SELECT firstName, email, lastName FROM {$TABLE_PREFIX}".mysql_escape($_gl_ena_tableName)." WHERE num = '" .mysql_escape($_gl_ena_recordNum). "'";

Which lets us know that the "35" in your example is coming from "$_gl_ena_recordNum". Looking further up in the code, that variable is set with:

$_gl_ena_recordNum = (int)@$_GET['gl_ena_recordNum'];

Which is grabbing the value from the URL of the page you are on when you trigger the plugin. I am wondering if you could post up what you see after the admin.php script on the page you trigger the script from? Does anything there seem out of place?

If this doesn't get us anywhere, I think it might be time to try and contact the deveveloper of the plugin. Our site has them listed as: Graphic Lingoes: http://www.graphiclingoes.com/

Let me know what you think. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/