AbanteCart Community

Shopping Cart Operations => Support => Topic started by: raauulrg on November 01, 2016, 02:58:18 PM

Title: Multi store customers question
Post by: raauulrg on November 01, 2016, 02:58:18 PM
Hi,

I currently have multi store working, however if I make one account in, let's say, "Store A", I can log in with the same username/password in "Store B".

I want to know if there's a way to prevent this

Thank you
Title: Re: Multi store customers question
Post by: abantecart on November 01, 2016, 10:39:59 PM
Even though, customers are registered to specific store, there is no distinction for login purpose.
However, there is a simple code change to implement what you need.

I file core/lib/customer.php, look for:
Code: [Select]
public function login($loginname, $password){

In SQL that is used for authentication, you can add selection for specific store ID.

Store ID is automatically present  in:
Code: [Select]
$this->config->get('config_store_id')
Title: Re: Multi store customers question
Post by: raauulrg on November 04, 2016, 04:50:14 PM
Thank you, this really helped me, it works.