Hello I have a best practice question

Hope all is well.

How do you keep this change after a keycloak update? Is modifying keycloak source a bad practice?

What do you mean with „this change“? Which change?

Yes, it is.
Keycloak‘s features/functionality is based on SPIs. If you need a custom logic/behavior/extension, then you‘ll wan to implement the proper SPI with your desired logic and deploy it to Keycloak.
Never modify/overwrite the original Keycloak code, this will only yield in hell and you most probably will have a problem at some time when trying to upgrade.

Hello. By keep this change, I was referring to the alternatives developers are posting. How do you keep those changes after an upgrade.

The accountDisabled Message, is that feature gone forever? Or will keycloak ever allow for users to set that up again via spi?