CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Return of the Lost Password

Print topic Send  topic

Author Message
Shempy
Posted: 01/15/2002, 1:31 PM

Okay, here's what I've done so far (all for ASP): I took the code from Gotocode2.zip, and the code from the CC "Portal" website, and basically, I'm looking to merge the files together. I have been successful with EVERYTHING EXCEPT the "Lost Password" functionality. I don't think I'm alone here, as there are others in this forum with the same challenges. "Lost Password" WORKS in Gotocode2.zip file for me using CC V2.0.1, but I can't get it to work in the PORTAL codecharge file. Here's what I'm asking from you folks: Can you provide the Gotocode "Portal" with the "Lost Password" functionality, or at least give me another example to identify where the key data should go? Otherwise, a copy of the code is below:

===========================================
Here is a copy of the BEFORE INSERT code from Portal/Gotocode2 that I modified:
===========================================
'The recordset is created and read in the Validation section
email_subject = "Secure Site Information"
email_body = "Per your request, we are emailing you your login information." & VBcrlf & _
"Your Username/Login is: " & GetValue(user_rs, "member_login") & VBcrlf & _
"Your Password is: " & GetValue(user_rs, "member_password") & VBcrlf & _
VBcrlf & _
"Thank you for visiting our website. Please come back soon."
'Send text email
call sendemail("Customer Support", GetValue(user_rs, "email"), email_subject, email_body, 1)

fldlast_login_date = Now()
fldip_insert = Request.ServerVariables("REMOTE_HOST")

======================================================
And now here is the VALIDATION CODE from Portal/Gotocode2 that I modified:
======================================================
'Try finding this user
openrs members, "SELECT * FROM members WHERE member_login=""" & fldmember_login & """ OR email=""" & fldmember_login & """"
if GetValue(members, "member_id") = "" then sForgotErr = sForgotErr & chr(13) & "Sorry. We could not find this Login or Email in our records."

=======================================================
Finally, here is the MODULE / GLOBAL Code from Portal/Gotocode2 that I modified:
======================================================
function nl2br(str)
nl2br=replace(str,vbCrLf,"<br>")
end function

'Send Emails based on SQL query
'email_sql should contain the Email & Login
function sendemailssql(email_sql, email_from, email_subject, email_body, email_format)
sendemailssql = 0 'Email counter
openrs email_rs, email_sql
while not email_rs.EOF
'Replace [email] and [login] with actual email address and username
new_body = replace(email_body,"[email]",GetValue(email_rs, 0))
new_body = replace(new_body,"[login]",GetValue(email_rs, 1))
call sendemail(email_from, GetValue(email_rs, 0), email_subject, new_body, email_format)
email_rs.MoveNext
sendemailssql = sendemailssql +1
wend
end function

'Send single Email
sub sendemail(email_from, email_to, email_subject, email_body, email_format)
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = email_from
objCDO.To = email_to
objCDO.Subject = email_subject
objCDO.Body = email_body
objCDO.BodyFormat = email_format
objCDO.MailFormat = email_format
objCDO.Send
set objCDO=Nothing
end sub

Any help... greatly appreciated.
Shempy's Right Brain
Posted: 01/15/2002, 1:47 PM

I'm also using Access files from Portal and Gotocode2...
Nicole
Posted: 01/16/2002, 4:05 AM

Shempy,
could you provide more details? What exactly doesn't work?
Mark (AKA Shempy)
Posted: 01/16/2002, 3:32 PM

Basically, if I enter in ANY login/password combination, I get the "Password Sent" page instead of the "User Not found" message. Additionally, when I DO enter in a correct login or email, I still get the "Password Sent Page", but I DON'T get an email sent to the address that is in the database.

From a User perspective, the site APPEARS to work fine with the exception of not receiving the follow-up email. I don't get any server errors or anything like that.
Nicole
Posted: 01/17/2002, 2:16 AM

Mark,
looks like you need to debug the code step by step to find what result you get after each command execution. Doing so you'll find where the code behavior is incorrect.
Mark
Posted: 01/17/2002, 10:24 AM

I can appreciate your comment, but at the same time I suppose I've tried debugging things step by step, as you suggest, and I have hit a roadblock resulting in me turning to this support site as a last resort in frustration.

Based on your reply, I am assuming that the code submitted for your review is okay? What other areas might you suggest for me to look for bugs? Am I missing something here?

My request was still not answered: Does ANYONE have a working Codecharge file that utilizes the "Lost Password" functionality so that I can try to use this example and determine where the error lies in MY existing Codecharge file? Specifically, I used Gotocode2.cci and Portal.cci in ASP format.

Thanks in advance.
Mark
Posted: 01/17/2002, 9:50 PM

Thanks for the help... just got a little frustrated. Lots more work to do, and for anyone's reference, there was a lot more work involved than just the couple of lines of code above that I was having problems with. For anyone's reference: the files that get used are:

RegEdit
Registration
AccessDenied
Login

and the module site.

There probably was other things in there too, but I'm going to bed. Anyone interested, post it here, and I'll send you the info.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.