The below code can be used to log out the customers from an SC/SCA website.
- Comment the return section in the register function of account.model.js in Suitescript folder and add the below code.
ModelsInit.session.logout();
throw ('Type your message');
Uses
- If you want to restrict customers from login into the website based on any condition.
- If you want to have approval for website registration in microsites. You can let them register and and can remove return and add log out code.