@Tango
You could update model of phone number login, function findUserByPhone
Change:
$this->dao->where('s_phone_mobile', $phone);
into:
$this->dao->where('(s_phone_mobile="' . $phone . '" OR s_phone_land="' . $phone . '")');
$this->dao->where('pk_i_id != ' . osc_logged_user_id());
Not quite sure what could be impact, need testing.
I just tested it, and it works great for the
Register page (it checks if the number is already in use in both tables) and returns an error if true, however it doesn't work for the
User Account.
In the User Account, only the
Mobile Phone goes through validation, the
Land Phone can be updated to whatever number, regardless if it already exists or not.
As for the impact, fully solving this would make sure that the User Accounts have unique numbers. The same phone number shouldn't be used in 2 or more accounts at the same time.
We already have issues with spammy users, and this would add another layer of protection against them.
And let me give you an example from real life.
I worked for a company that was selling some products on a huge marketplace in our country.
One day, we started selling some products that were also sold by another guy, so we were in competition with him.
Do you know what he did? In 4 days, he placed 250 fake orders from our store, all with phone numbers gathered from the actual marketplace and from other places.
So basically, the asshole was creating tons of fake accounts, just to place fake orders and run us out of business.
In that week alone, we've lost over 200 Euros on shipping charges for fake orders, because the marketplace didn't care and forced us to ship some of the orders...
Now in Osclass, we have the Pay Plugin, that provides the same option.
You can't have a product shipped, if you don't provide a phone number. So fixing this plugin, means fixing the malicious recycling of phone numbers.
If it's already in use, then you can't use it in your account.
Sorry for the long post.
Thanks!
EDIT:Umm... On a second thought, what happens if an asshole spammer, creates tons of accounts with random numbers, and amongst those numbers are real ones from real people?
Basically that guy would block a real person from using his actual phone number, by already registering it in the system...
Yeah, tough call.
I would say to have the uniqueness check as an option, like this: