In our hook that created a custom login action, we modified the login.events.pre portal property of portal.properties. This property accepts multiple values, so our value was appended to the existing login.events.pre values. We can repeatedly modify the property from additional hooks because it accepts mulstiple values. Some portal properties only accept a single value, such as the terms.of.use.required property, which is either true or false. Only modify single value properties from one hook; otherwise Liferay won’t know which value to use.
Note: You can’t override all portal properties in a hook. To find a complete list of those you can, look in liferay-hook-[liferay version].dtd, in the definitions folder of the Liferay source code. In addition to defining custom actions, hooks can override portal properties to define model listeners, validators, generators, and content sanitizers.
Next, let’s override a portal service with a hook.