How to Limit Target User Account Access?
-
Hi John,
I understand that any user with the “switch_user” privilege can switch user accounts using this plugin, and that a separate user role editor plugin can let me alter privileges like that. I have reason to grant that privilege to Customer accounts on a given WooCommerce site (explained next paragraph). But is there a way to limit which user accounts one can switch to by a factor such as user role? My main concern is to disallow any of my Customer user accounts for my WooCommerce site to switch to one of my Admin or Shop Manager accounts; I just want them to be able to switch between other Customer accounts only.
What I’m trying to accomplish: my client wants me to build a wholesale order portal with WooCommerce. He specifically wants me to allow multiple sales reps to make wholesale orders with one “master” account and password that can access a couple hundred customer accounts. My design thought at the moment is to create a “master” user account for all sales reps to login to. When they log in, they’re redirected and granted access to a Pick a Customer page that contains a list of clickable/tappable buttons for all Customer user accounts in the system. By tapping or clicking a customer button, I want the site to switch to that customer account automatically, invisible to the end user or entirely behind the scenes (i.e. without requiring another login process besides the “master account” login) so that the correct customer, postal address, payment method, etc. is processed with the order. After clicking the customer button, it’ll take them to a bulk order page (i.e. I’m eyeballing this one: https://rapidorderplugin.com/).
I’ve been developing WordPress sites for over 3 years now, but haven’t had to tackle this much of a challenge before (I mostly do custom themes). Thanks so much for any help.
Peace,
Brian
- The topic ‘How to Limit Target User Account Access?’ is closed to new replies.