Gossamer Forum
Home : Products : DBMan : Customization :

Enter password twice at signup

Quote Reply
Enter password twice at signup
I know I've seen this, but I can't find it:
The code to have the password entered twice and compared at signup -- to ensure it's been properly typed
Quote Reply
Re: Enter password twice at signup In reply to
That specific issue hasn't been dealt with. What you may have seen recently is a modification of the password lookup mod which requires users to enter their passwords twice when they change their passwords.

You would need to add another field to sub html_signup_form in html.pl. After

Code:
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Password:</b></FONT></td>
<td><input type="PASSWORD" name="pw" value="$in{'pw'}"></td></tr>

add

Code:
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Enter Password Again:</b></FONT></td>
<td><input type="PASSWORD" name="pw2" value="$in{'pw'}"></td></tr>

In db.cgi, sub signup, after

Code:
unless ((length($in{'pw'}) >= 3) and (length($in{'pw'}) <= 12)) {
$message = "Invalid pw: '$in{'pw'}'. Must be less then 12 and greater then 3 characters.";
}

add

Code:
unless ($in{'pw'} eq $in{'pw2'}) {
$message = "You must enter the same password twice";
}


------------------
JPD





Quote Reply
Re: Enter password twice at signup In reply to
That's it. Thanks!