How to disable password reset on first login in liferay.
To disable password reset follow the below step.
1.Change portal settings: Go to control panel>Password policies>default password policies and false change required check box.
2.Change portal.properties in custom hook:
Create a hook and below properties.
<?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>
</hook>
And add below properties.
passwords.default.policy.change.required=false # For password reset false
users.reminder.queries.enabled=false #For remainder queries
users.reminder.queries.custom.question.enabled=false #For custom questions
login.create.account.allow.custom.password=true #For custom password
terms.of.use.required=false #For agree terms of use
3.In java code update user:
user.setPasswordReset(false);
UserLocalServiceUtil.updateUser(user);
Enjoy...
1.Change portal settings: Go to control panel>Password policies>default password policies and false change required check box.
![]() |
| Change Required |
2.Change portal.properties in custom hook:
Create a hook and below properties.
<?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>
</hook>
And add below properties.
passwords.default.policy.change.required=false # For password reset false
users.reminder.queries.enabled=false #For remainder queries
users.reminder.queries.custom.question.enabled=false #For custom questions
login.create.account.allow.custom.password=true #For custom password
terms.of.use.required=false #For agree terms of use
3.In java code update user:
user.setPasswordReset(false);
UserLocalServiceUtil.updateUser(user);
Enjoy...

Comments
Post a Comment