Hello all, I am wanting to see if anyone has code for adding a double email field to the User Sign-Up / Registration page so that the user is in effect, verifying their email as they sign up so they don't type in the wrong email by mistake. THis functionality would be the same as password verification (checks to make sure the data entered in BOTH field are the SAME. This would be different from the email verification AFTER they sign up, as that would remain the same. If anyone has code to make this possible, I would greatly appreciate if you could post it here for myself and others that may like this functionality. I tried searching for this here, but just couldn't seem to locate the exact function i need. If it's already here, i apologize in advance and if you could link me to the post that would be wonderful!! Thanks, Kris
Ok, there are a couple of changes to make: Open amember/signup.php and find (around line 71) Code: if (!check_email($vars['email'])){ $error[] = _SIGNUP_PLEASE_ENTER_EMAIL; } elseif (($config['unique_email'] && $member_id <= 0) && $db->users_find_by_string($vars['email'], 'email', 1)){ $error[] = _SIGNUP_INVALID_EMAIL_1.'<br />'.sprintf(_SIGNUP_INVALID_EMAIL_2,'<a href="member.php">','</a>','<br />'); } add after the above the following: Code: if($vars[email] != $vars[emailcheck]){ // added for email check $error[] = _SIGNUP_INVALID_EMAILCHECK_1; } safe and close the file. Open amember/templates/signup.html and find (around line 65) Code: <tr> <th><b>#_TPL_SIGNUP_EMAIL# *</b><br /> <div class="small"><label for="id">#_TPL_SIGNUP_EMAIL_1#</label><br />#_TPL_SIGNUP_EMAIL_2#</div></th> <td><input id="f_email" class="required email" type="text" name="email" value="{$smarty.request.email|escape}" size="30" /> </td> </tr> replace it with the following code: Code: <tr> <th> <strong><label for="email">#_TPL_SIGNUP_EMAIL#</label> <span class="redsplat">*</span></strong><br /> <div class="small">#_TPL_SIGNUP_EMAIL_1# #_TPL_SIGNUP_EMAIL_2#</div> </th> <td><input id="f_email" class="required email" type="text" name="email" value="{$smarty.request.email|escape}" size="30" /></td> </tr> <tr> <th> <strong><label for="f_emailcheck">#_TPL_SIGNUP_EMAILCHECK#</label> <span class="redsplat">*</span></strong><br /> <div class="small">#_TPL_SIGNUP_EMAILCHECK_1# #_TPL_SIGNUP_EMAILCHECK_2#</div> </th> <td><input id="f_emailcheck" class="required email" type="text" name="emailcheck" value="{$smarty.request.emailcheck|escape}" size="30" /></td> </tr> Note that I replaced the B tags with STRONG and moved the LABEL tags outside the DIV (You may not nest a block level element inside of an inline element. Label is an inline element, DIV is block level.) Safe and close the file. Open amember/language/en-custom.html (if it not exist create the file) and add the following code: Code: define ('_TPL_SIGNUP_EMAILCHECK', 'Once more Your E-mail Address'); define ('_TPL_SIGNUP_EMAILCHECK_1', 'To be absolutely sure the email address <br />'); define ('_TPL_SIGNUP_EMAILCHECK_2', 'you just entered is correct.'); define ('_SIGNUP_INVALID_EMAILCHECK_1', 'The email address and control email address do not match.'); Note the above is for the ENGLISH language, if you have other languages edit/create the specific custom language file and add the code and change the wording to your language. For example here's the Dutch code (nl-custom.html) Code: define ('_TPL_SIGNUP_EMAILCHECK', 'Nogmaals je emailadres'); define ('_TPL_SIGNUP_EMAILCHECK_1', 'Om 100% zeker te zijn dat<br />'); define ('_TPL_SIGNUP_EMAILCHECK_2', 'het emailadres juist is'); define ('_SIGNUP_INVALID_EMAILCHECK_1', 'Het emailadres en controle emailadres stemmen niet overeen.'); If you had to create any custom language file, remember that you have to add <?php as the first line of the file and ?>as the very last line! If I recall correctly these were the changes I made. Let me know how it goes. Erwin
I suggest that this be a new feature and something that should be definitely be included in version 4.
I agree. I got a high number of duplicated members, because of their email data entry errors. This is a good control. Thanks.