Disabling the Change of password for the user


If we want to disable the change of the password when user is logging into first time, we can follow these 2 steps

1. When the user is creating the my code, i mean if we have written the code for adding the user instead of out of box. then we can set like this .

user.setPasswordReset(false);
UserLocalServiceUtil.updateUser(user);


2. I think this option we be better, Go to the controlPanel

Control Panel -> Password Policies(Portal Section) -> Default Password Policy .-> Change Required (uncheck checkbox).

That's it , when user is logging first time, then we cannot get change password screen.

Comments

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate