Re: Use E-mail address instead of username 3.5.x & 4.0
For xcart version 4.1.9 pro version
I just changed the username to email address and i need to know whether i missed anything.
I think it is working fine ,but i don't know the side effects.
1.altered the table xcart_customer ->login field length to 128.
2.altered the table xcart_orders->login field length to 128.
3.include /login.php
changed this line ->
$is_username_len_err = strlen($HTTP_POST_VARS["username"]) > 128;
4.include/register.php
replace this
$allowed_update = (($usertype == $current_area && !empty($login) && !empty($uname) && $login == $uname) || ($current_area == "P" && $active_modules["Simple_Mode"]) || $current_area == "A");
with
$allowed_update = (($usertype == $current_area && !empty($login) && !empty($uname) && (($login == $uname)||($login == $email))) || ($current_area == "P" && $active_modules["Simple_Mode"]) || $current_area == "A");
5.in register.tpl
Add this:
inside the below line:&& checkEmailAddress(document.registerform.uname, 'Y')
after this condition:{if $default_fields.email.avail eq 'Y'} && checkEmailAddress(document.registerform.email, '{$default_fields.email.required}'){/if}
if (check_zip_code(){if $default_fields.email.avail eq 'Y'} && checkEmailAddress(document.registerform.email, '{$default_fields.email.required}'){/if}{if $config.General.check_cc_number eq "Y" AND $config.General.disable_cc ne "Y"}&& checkCCNumber(document.registerform.card_number,do cument.registerform.card_type) {/if}&& checkRequired(requiredFields)) {ldelim}
Is this enough ?
It works fine for me.
__________________
MercuryMinds Technologies Development Team,
Professional X-Cart Design, X-Cart Development, X-Cart Customization Services
www.mercuryminds.com
X-Cart Mailchimp Ecommerce 360 Plugin/integration module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x)
Smasher, a smart search engine for x-cart store (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x)
One Page Checkout (OPC) - X-Cart module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x)
|