First edit skin1/check_email_script.tpl, replace its entire contents with:
Code:
{* $Id: check_email_script.tpl,v 1.6.2.2 2004/03/26 09:47:33 svowl Exp $ *}
{literal}
<script language="JavaScript1.2">
function checkEmailAddress(field) {
var goodEmail = field.value.search(/^[A-Za-z0-9]{1}([A-Za-z0-9_\-\.]+)[^\.]\@[^\.]([A-Za-z0-9_\-\.]+\.)+[A-Za-z]{2,6}[ ]*$/gi);
if (goodEmail!=-1) {
if(field.value==document.registerform.emailtwo.value) {
return true;
} else {
alert("Email's do not match, please correct!");
document.registerform.emailtwo.focus();
document.registerform.emailtwo.select();
return false;
}
} else {
{/literal}
alert("{$lng.txt_email_invalid|replace:"\n":" "|replace:"\r":" "}");
{literal}
field.focus();
field.select();
return false;
}
}
</script>
{/literal}
Now open up skin1/main/register_contact_info.tpl and underneath the email table row (</tr>) add this:
Code:
<tr valign=middle>
<td align=right>Validate {$lng.lbl_email}</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=emailtwo size=32 maxlength=128 value="{$userinfo.email}">
</td>
</tr>
This way your not inserting two emails into the database but rather making sure the user has entered the same values into the email field incase of misstypes. All javascript based.
Above code was written with 3.5.x