| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Use E-mail address instead of username 3.5.x & 4.0 | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#51
|
|||||||
|
|||||||
![]() Wouldn't it be better to update the database with a unique index on e-mail and usertype?
I mean something like Code:
So it would be possible to have a provider, admin and customer account (for testing) on the same e-mail address. What do you think? Hope to hear from you soon. Best wishes, Marc |
|||||||
#52
|
|||||||
|
|||||||
![]() $user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE BINARY login='$username' AND usertype='$usertype' AND status='Y'");
Note there's a BINARY there. I followed boomer's instructions, but it seems it doesn't work. Anyone can give some hint? thanks!
__________________
all the best, Wubi ::::::::: xcart gold v4.3.2 with lots of customizations Linux Php 5.2.4 MySQL: 4.1.22-standard |
|||||||
#53
|
|||||||||
|
|||||||||
![]() Quote:
4.1.2 It seems a BINARY condition was added to help compare bytes codes vs charachter as is, the mod should still work up to 4.1.1 as-is, however here is the 4.1.2 code for include/login.php: Code:
![]() |
|||||||||
#54
|
|||||||
|
|||||||
![]() BINARY only makes it case-sensitive even if the charset isn't case-sensitive right? If we are comparing emails, most of the time we can get away without being case-sensitive (though technically emails are case-sensitive but are not generally enforced). This was in the latest v4.0.19 patch but I didn't include it.
__________________
4.1.8 |
|||||||
#55
|
|||||||
|
|||||||
![]() I did this on my 4.1.3 install as descibed by xcell67 on page4 of this thread and it seemed to work OK, but when testing some other things I registered a new user during checkout, this user´s login wasn´t the e-mail address, it was anonymous-4.
Can anyone reproduce this or did I miss something when performing the mod? thanks
__________________
Showoff Imports.nl - Largest Tuning Store of Europe ----------------------------------- Currently using X-Cart 4.1.3 |
|||||||
#56
|
|||||||
|
|||||||
![]() Anyone know anything about the above Post? We'd also like to have this since I don't like the idea of people being able to get Account details of 5 people using the same e-mail address.
Cheers.
__________________
Location: UK X-Cart: Gold 4.4.2, Status: Finalizing Template: Colors Free Mods: Colour Coded Orders, FAQ Manager Paid Mods: None... yet. Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13 |
|||||||
#57
|
|||||||
|
|||||||
![]() Hello,
Did anyone get this to works correctly on 4.1.3 yet? I would like to implement it into our site if it will work with our version. Thanks!
__________________
X-Cart Gold v4.4.1 |
|||||||
#58
|
|||||||
|
|||||||
![]() I just disabled anonymous orders, everyhing else works fine.
__________________
Showoff Imports.nl - Largest Tuning Store of Europe ----------------------------------- Currently using X-Cart 4.1.3 |
|||||||
#59
|
|||||||||
|
|||||||||
![]() I've seen alot of elaborate coding to accomplish what seems to be an easy problem to solve. It's entirely possible that I'm missing some things but this is how I force the username = email address issue.
I set the email field to "Unique" and added the following code at the top of include/register.php Quote:
__________________
~Tyson |
|||||||||
#60
|
|||||||
|
|||||||
![]() tpaul,
What version of x-cart are using? Quote:
__________________
X-Cart Gold v4.4.1 |
|||||||
|
|||
X-Cart forums © 2001-2020
|