The first time users log into Liferay Portal, they’re presented with a “terms of use” page. Users must agree to the terms of use in order to continue. This feature is controlled by a property
in Liferay’s default portal.properties file that looks like this:
terms.of.use.required=true
we can configure a hook to turn off this feature by changing the property from true
to false.
Step 1:First, we meed to configure our hook to override properties by editing liferay-hook.xml
Open the
configure our hook to override properties by editing liferay-hook.xml to look like this:
liferay-hook.xml
<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook>
<portal-properties>portal.properties</portal-properties>
<custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>
</hook>
Step 2: open portal.properties file from our project’s
and put this
terms.of.use.required=false
Step 3: Save and close this file And deploy our hook
Create a new user and log in. The Terms of Use page should not be there
New users won’t need to accept the terms of service,and we won’t need to restart our portal for this to take effect.
NOTE:if you wanted to revert this property back to the default behavior, all you would need to do is undeploy the hook, and the portal would immediately revert without the need for a restart.
in Liferay’s default portal.properties file that looks like this:
terms.of.use.required=true
we can configure a hook to turn off this feature by changing the property from true
to false.
Step 1:First, we meed to configure our hook to override properties by editing liferay-hook.xml
Open the
liferay-hook.xml
file from our project’s docroot/WEB-INF
folder of our example-hook (what we created in previous post)configure our hook to override properties by editing liferay-hook.xml to look like this:
liferay-hook.xml
<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook>
<portal-properties>portal.properties</portal-properties>
<custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>
</hook>
Step 2: open portal.properties file from our project’s
docroot/WEB-INF/src
folder and put this
terms.of.use.required=false
Step 3: Save and close this file And deploy our hook
Create a new user and log in. The Terms of Use page should not be there
New users won’t need to accept the terms of service,and we won’t need to restart our portal for this to take effect.
NOTE:if you wanted to revert this property back to the default behavior, all you would need to do is undeploy the hook, and the portal would immediately revert without the need for a restart.
1 comment:
is it also possible to skip the password reset steps?
Post a Comment