close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Reset password allows user to change email

Thread began 1/30/2012 7:10 am by steelace396915 | Last modified 2/03/2012 10:55 am by Jason Byrnes | 1885 views | 8 replies |

steelace396915

Reset password allows user to change email

Hi

I noticed a problem, at least for me, when testing the forgotpassword page built with SA wizard. I did not do any changes to it but tested it straight from the wizard. When the user recieves the email with the reset password link and is taken to that page its possible to change the email address to whatever along with the password. I did not reflect over this before and Im not sure this is the way it is supposed to be!? I would prefer that a user changing his password through that page has to enter his/hers registered email address and if it is not correct displaying a messege about the problem. Could I change this easily?

Thanks in advance,
Martin J.

Sign in to reply to this post

steelace396915

Sorry I have asked this question before and got an answer from Jason! Just forgot about it. The original question and solution can be found here:

showthread.php?p=116752#post116752

I do wonder though if it would be possible to keep the email field on the reset password section and some way validate the address the user puts in against registered emailaddress in db and if not the same stop the form submit and display a messege to the user!?

Thanks in advance,
Martin J.

Sign in to reply to this post

Jason ByrnesWebAssist

create a recordset that filters the email column on the entered email address.

then edit the server validations server behavior and add a like entry validation. For the Server Variable, select the email form element, for the compare to variable select the email address column from the recordset. this will cause validation to fail if the email cannot be found

Sign in to reply to this post

steelace396915

Jason, I tried this but I don't get it to work all the way. Could you please take a look at the code for my forgotpassword page? It makes perfect sense the way you explained it though but I have probably made some little mistake I can't spot! I enclose the page in a zip file. Also enclosed 2 screen images on the settings in the recordset and the reset password Server Validation. Please take a look and see what I might have done wrong.

Thanks in advance!

/Martin J.

Attached Files
screen_images.zip
Sign in to reply to this post

Jason ByrnesWebAssist

2 issues.

1) in the recordset filtering, you selected the Entered value filter type, you need to select form post filter type.

2) code order.

the recordset code is before the validation code, the recordset code needs to be moved so that is comes before the validation code.

Sign in to reply to this post

steelace396915

Ok I see! I tried it Jason and the forgotpassword section works and sends email with reset link correctly to user. However on the reset page its now impossible to submit any email, registered or not registered. It seems like when Im moving the recordset above the server validation code the "SA Email Encrypted Password Return" behaviour is moved along with the recordset!? Could this have something to do with it does not work? Could you please take one more look at my page at this present stage!?

Thanks in advance!

/Martin J.

Sign in to reply to this post

Jason ByrnesWebAssist

the only code that should be moved is:

$colname_rsEmail = "-1";
if (isset($_POST['StudentEmail'])) {
$colname_rsEmail = $_POST['StudentEmail'];
}
mysql_select_db($database_steelguitar_se, $steelguitar_se);
$query_rsEmail = sprintf("SELECT * FROM student WHERE StudentEmail = %s", GetSQLValueString($colname_rsEmail, "text"));
$rsEmail = mysql_query($query_rsEmail, $steelguitar_se) or die(mysql_error());
$row_rsEmail = mysql_fetch_assoc($rsEmail);
$totalRows_rsEmail = mysql_num_rows($rsEmail);



the forgot password code should not be moved.

Sign in to reply to this post

steelace396915

Ok Jason, Ive moved that code and put it in a php block between the forgot password server validation code and reset password server validation code. The following error is reported in browser:

Fatal error: Call to undefined function GetSQLValueString() in /www/webvol20/4r/opk815z0jqke9td/steelguitar.se/public_html/student/forgotpassword.php on line 30

Also when I inserted the Like Entry value for the email field in the WA Server Validation (Reset Password) block I get a java script error warning like in the enclosed screen image.

I have checked everything many times according to your instructions but it does not work for me.

/Martin J.

Attached Files
forgotpassword.zip
screen_image_java_error.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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...