Restrict Vendor Administrators To Login To The Store


I've a B2B marketplace using CS-Cart MVE and by default I do not want the users with Vendor Administrator privileges be able to login to the store. How can I put the required restrictions so that vendor admin can register in the vendor admin panel but not in the store.

Members please help.



You should alter the fn_login_user function (app/functions/fn.users.php) to add such condition

It would be better to use the 'login_user_pre' hook so your changes will survive future upgrades. If your condition is met then set $user_id = 0 and it will notify the user that the user was not found.