close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Forgot Password page issue

Thread began 2/15/2012 12:39 pm by Steve | Last modified 2/16/2012 1:07 pm by Jason Byrnes | 2191 views | 8 replies |

Steve

Forgot Password page issue

Hello,
Basic wizard created password retrieval page is giving an error

" Unknown column 'UserEmail' in 'field list "

if(isset($_POST["ForgotPassword_submit"])){
//WA SecurityAssist Email object="mail"
$WA_Auth_Parameter = array(
"connection" => $MySQLcmhi,
"database" => $database_MySQLcmhi,
"tableName" => "tblretailer",
"filterColumn" => "retailerid",
"filterEncryption" => "",
"columnValue" => "".((isset($_POST["Forgot_Password_group_Email"]))?$_POST["Forgot_Password_group_Email"]:"") ."",
"columnType" => "int",
"usernameColumn" => "retaileremail",
"usernameEncryption" => "",
"passwordColumn" => "UserPassword",
"passwordEncryption" => "",
"selectColumns" => array("UserEmail","UserPassword","retaileremail","retailerid"),
"sessionVariables" => array(""),
"successRedirect" => "access.php?emailedPassword=1",
"failRedirect" => "forgotpassword.php?notFound=1",
"keepQueryString" => TRUE,
"toAddressColumn" => "retailerid",
"toAddressEncryption" => "",
"fromAddress" => "Administration@domain.org",
"fromAddressDisplay" => "Administration",
"subject" => "Forgotten Password",
"mailBody" => "webassist/security_assist/email/forgotpassword_email2.php",
"emailFunction" => "WA_SecurityAssist_Email_1_SendMail"
);

WA_Auth_ForgotPassword($WA_Auth_Parameter);
}



In the SecurityAssist: Email Password panel under DataBase tab the Lookup Value is:
<?php echo ((isset($_POST["Forgot_Password_group_Email"]))?$_POST["Forgot_Password_group_Email"]:""); ?>

I'm thinking of creating a recordset based on the user email address and then using that as the lookup value but would like to better understand the extensions requirements before I deviate to hand coding.

Sign in to reply to this post

Jason ByrnesWebAssist

the error is saying that in the tblretailer table, there is not a column named UserEmail


What version of security assist?

Are you testing locally or remotely?

what is the structure of the tblretailer table?

Sign in to reply to this post

Steve

Hello Jason,
Latest Version of Security Assist
Testing to live server

Table structure as follows:

CREATE TABLE IF NOT EXISTS `tblretailer` (
`retailerid` int(11) NOT NULL AUTO_INCREMENT,
`retailername` varchar(75) DEFAULT NULL,
`retaileraddress` varchar(50) DEFAULT NULL,
`retaileraddress2` varchar(50) DEFAULT NULL,
`retailercity` varchar(25) DEFAULT NULL,
`retailerphone` varchar(15) DEFAULT NULL,
`retailerfax` varchar(15) DEFAULT NULL,
`retailerstate` int(11) DEFAULT NULL,
`retailerzip` varchar(15) DEFAULT NULL,
`retaileremail` varchar(50) DEFAULT NULL,
`retailerwebpage` varchar(70) DEFAULT NULL,
`retailerregionid` int(11) DEFAULT NULL,
`subretailerregionid` varchar(70) DEFAULT NULL,
`retorcomm` int(11) DEFAULT '0',
`retailertype` tinyint(4) DEFAULT '1',
`cnt_name1` varchar(75) DEFAULT NULL,
`cnt_email1` varchar(50) DEFAULT NULL,
`cnt_phone1` varchar(15) DEFAULT NULL,
`cnt_name2` varchar(75) DEFAULT NULL,
`cnt_email2` varchar(50) DEFAULT NULL,
`cnt_phone2` varchar(15) DEFAULT NULL,
`memb_Info` text,
`pdfpath` varchar(60) DEFAULT NULL,
`tollfree_no` varchar(30) DEFAULT NULL,
`keyword` varchar(255) DEFAULT NULL,
`estar` smallint(2) DEFAULT '0',
`lat` float(10,6) DEFAULT NULL COMMENT 'added 2/2012',
`lng` float(10,6) DEFAULT NULL COMMENT 'added 2/2012',
`UserPassword` varchar(500) DEFAULT NULL COMMENT 'password',
PRIMARY KEY (`retailerid`)

Sign in to reply to this post

Jason ByrnesWebAssist

I dont see a UserEmail table in that structure

Sign in to reply to this post

Steve

Yes that is correct. The email table is `retaileremail`

Sign in to reply to this post

Jason ByrnesWebAssist

this line:
"selectColumns" => array("UserEmail","UserPassword","retaileremail","retailerid"),


is referencing the UserEmail column


change it to:
"selectColumns" => array("UserPassword","retaileremail","retailerid"),

Sign in to reply to this post

Steve

Hello,
Now it can't find the email address

"Your email address could not be found in our records. Please try again."

Linked somehow to the prior value we just moved? Also where is the area to retarget the 'UserEmail' value? It was originally set in the Wizard that used the powerCMS2v default.


UPDATE

I saw two references to retailerid which I changed to retaileremail and now it notes that the send was successfull

$WA_Auth_Parameter = array(
"connection" => $MySQLcmhi,
"database" => $database_MySQLcmhi,
"tableName" => "tblretailer",
"filterColumn" => "retaileremail",
"filterEncryption" => "",
"columnValue" => "".((isset($_POST["Forgot_Password_group_Email"]))?$_POST["Forgot_Password_group_Email"]:"") ."",
"columnType" => "int",
"usernameColumn" => "retaileremail",
"usernameEncryption" => "",
"passwordColumn" => "UserPassword",
"passwordEncryption" => "",
"selectColumns" => array("UserPassword","retaileremail","retailerid"),
"sessionVariables" => array(""),
"successRedirect" => "access.php?emailedPassword=1",
"failRedirect" => "forgotpassword.php?notFound=1",
"keepQueryString" => TRUE,
"toAddressColumn" => "retaileremail",
"toAddressEncryption" => "",
"fromAddress" => "Administration@domain.org",
"fromAddressDisplay" => "Administration",
"subject" => "Forgotten Password",
"mailBody" => "webassist/security_assist/email/forgotpassword_email2.php",
"emailFunction" => "WA_SecurityAssist_Email_1_SendMail"
);




"filterColumn" and "toAddressColumn" both were targetting the retailerid value... Not sure where these got crossed up

Sign in to reply to this post

Steve

Emails received but in the email there seems to be that global that I can not track down.

Rather than show the actual email address in the received email it references the UserEmail:

Username: [UserEmail]
Password: xxxxxx

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the webassist/security_assist/email/forgotpassword_email2.php page so i can see the code that creates the email

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...