Fórum

How to update password in User_ table

thumbnail
Ibrahim Mahammad, modificado 12 Anos atrás.

How to update password in User_ table

Junior Member Postagens: 47 Data de Entrada: 30/11/11 Postagens Recentes
I created a custom portlet to update user password.

While i changed the password by using my custom portlet then its effecting in database and both the 'password' and 'passwordModifiedDate' are changed. But once i logout and try to login with new password then the 'password' and 'passwordModifiedDate' are automatically changing to previous values.

Even I am not able to change the other values in User_ table like firstName, middleName and lastName.

some one pls specify how to update details in User_ table.
thumbnail
Mika Koivisto, modificado 12 Anos atrás.

RE: How to update password in User_ table

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
You need to update it through the api or flush caches after updating it directly to db.
thumbnail
Muniraj saravanan, modificado 12 Anos atrás.

RE: How to update password in User_ table

Junior Member Postagens: 95 Data de Entrada: 01/06/11 Postagens Recentes
use UserLocalServiceUtil.updatePassword API
thumbnail
Ibrahim Mahammad, modificado 12 Anos atrás.

RE: How to update password in User_ table

Junior Member Postagens: 47 Data de Entrada: 30/11/11 Postagens Recentes
thanks a lot.

I used the below code to update password in User_ table.

UserLocalServiceUtil.updatePasswordManually(userId, newpassword, true, false,passwordModifiedDate);

it worked fine.

But how to update screenName, emailAddress, firstName, middleName, lastName and jobTitle in the User_ table.
thumbnail
Ravi Kumar Gupta, modificado 12 Anos atrás.

RE: How to update password in User_ table

Liferay Legend Postagens: 1302 Data de Entrada: 24/06/09 Postagens Recentes
Many ways.. You can get user from UserLocalServiceUtil for the userid you have. Then in that object update all the values you want.

Or

In the same manner you updated password.. there are many other methods for updating email, screen name etc.. Just try..

HTH
thumbnail
srikanth a, modificado 12 Anos atrás.

RE: How to update password in User_ table

Regular Member Postagens: 144 Data de Entrada: 21/02/11 Postagens Recentes
Hi,
I suggest you to go through the UserLocalServiceUtil API for other required methods. you can find required method.

regards
Sri