cancel
Showing results for 
Search instead for 
Did you mean: 

Disable login for all customers

Former Member
0 Kudos

What is the best way to disable login for all customers because of maintenance activities in backend.

From what i see there is no standard functionalities for doing this.

Thank you, Florin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Florin,

Let me try to distinguish between the separate concerns you have here:

=> Disable user login (a customer is a user after all)
- using the option found in the Password tab, either in hmc or in backoffice

- using the User.setLoginDisabled() method in code

=> Disable user/usergroup login in hmc
- option is found in the same place

=> Disable user/usergroup login in Backoffice
- using the option found in the Administration tab, either in hmc or in backoffice

=> You can always change the loginDisabled attribute via ImpEx for all entries in the User table

!The admin user and adminusergroup cannot be restricted from logging in.

=> Use a Maintenance page whenever maintenance operations are performed
- this is the best practice
- this configuration is done at webserver/load balancer level
- it's also recommended to return a 503 status message, to avoid having the Maintenance page being indexed by the search engines

I hope this helps you to achieve what you wanted.
Best regards,
Eduard

Former Member
0 Kudos

Hi Eduard

thank your for your answer.

i can't disable each time login for 40.000 users, even using impex, each time we put a patch in SAP. Login can be disabled by group only for hmc and not for storefront. The solution with maintenance can't work because i want to disable only login/price/stock/orders during patching and not the anonymous catalog which can work without problems. Regards, Florin

Answers (1)

Answers (1)

former_member632755
Active Contributor
0 Kudos

Hi,

the easiest would be to override the implementation of a service used for logging in (usually it checks for *loginallowed fields. You may check the flag you want to use to globally disable it and delegate to super method if the flag allows for login.

Cheers, Wojtek

Former Member
0 Kudos

Hi Wojtek

thank you for your answer.

i will try to implement like you suggested.

Regards, Florin