Restricting Users from Signing Up Across Multiple Stores
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 48
- Joined: 30 Apr 2023, 12:46
Restricting Users from Signing Up Across Multiple Stores
I'm currently working with Aimeos and facing an issue regarding user signups across multiple stores. The requirement is to ensure that a user cannot sign up for multiple stores since there is a single siteid field in user schema.
While I can make the siteid field empty to address the signup issue, this introduces a problem. When administrators navigate to their dashboard's at /admin/{siteCode}/jqadm/search/customer, they can view user data even before the user has completed the signup process.
I'm looking for a solution that prevents users from signing up across multiple stores without compromising the security of user data in the admin dashboard. Any suggestions or insights into how to achieve this balance would be greatly appreciated!
While I can make the siteid field empty to address the signup issue, this introduces a problem. When administrators navigate to their dashboard's at /admin/{siteCode}/jqadm/search/customer, they can view user data even before the user has completed the signup process.
I'm looking for a solution that prevents users from signing up across multiple stores without compromising the security of user data in the admin dashboard. Any suggestions or insights into how to achieve this balance would be greatly appreciated!
Re: Restricting Users from Signing Up Across Multiple Stores
Just to get it right: Users should be able to buy from all stores but the vendors should not see the users in the Customer panel?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 48
- Joined: 30 Apr 2023, 12:46
Re: Restricting Users from Signing Up Across Multiple Stores
YesUsers should be able to buy from all stores
Each vendor ( site admins ) should still see his customers ( customers they already sign in / sign up on his store "only" )vendors should not see the users in the Customer panel
Re: Restricting Users from Signing Up Across Multiple Stores
The records in the user table are shared across all stores and there's no property that states that the user has "signed in/up" to the vendor site. You may add another table where you store such information, e.g. the vendor site ID the user should be available for. Then, you can adapt the class for the customer panel of the admin backend to use that information to show the appropriate user records only.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 48
- Joined: 30 Apr 2023, 12:46
Re: Restricting Users from Signing Up Across Multiple Stores
What is an easy way to perform an inner join between the Customer and CustomerSide (New Table) here?
If I create the CustomerSite Table:
In `./src/Admin/JQAdm/Customer/Standard.php`:
If I create the CustomerSite Table:
Code: Select all
return array(
'table' => array(
'' => function (\Aimeos\Upscheme\Schema\Table $table) {
$table->engine = 'InnoDB';
$table->int('customerid');
$table->string('siteid');
$table->index(['label', 'siteid'], ...etc);
$table->foreign('siteid', .... etc);
},
),
);
Code: Select all
public function search(): ?string {
....
// "What is an easy way to inner join between Customer and CustomerSide (New Table) here?"
$view->items = $manager->search($search, $this->getDomains(), $total);
.....
}
Re: Restricting Users from Signing Up Across Multiple Stores
Yes, if you add an "internaldeps" property to the search definition of "id" like here:
https://github.com/aimeos/aimeos-core/b ... rd.php#L30
https://github.com/aimeos/aimeos-core/b ... rd.php#L30
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 48
- Joined: 30 Apr 2023, 12:46