Fórum

Updating User Lockout

thumbnail
Daniel Breitner, modificado 15 Anos atrás.

Updating User Lockout

Regular Member Postagens: 105 Data de Entrada: 16/07/08 Postagens Recentes
Hello all ...

I am trying to un-lock a locked user by clicking on a button.

Everything works fine ... except:

I am calling UserLocalServiceUtil.updateLockout and I get the unlocked user.
But the user is not updated in the database ... do I miss something, or do I have to update him manually ?

With kind regards

Daniel Breitner
Alex Bu, modificado 11 Anos atrás.

RE: Updating User Lockout

New Member Mensagem: 1 Data de Entrada: 18/09/12 Postagens Recentes
Same question!
thumbnail
Bart Simpson, modificado 11 Anos atrás.

RE: Updating User Lockout

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
If you digg into the code you'll find that the model is updated but not merged with the current session.
userPersistence.update(user, false);

so you should update the user and merge it as well, using
com.liferay.portal.service.UserLocalServiceUtil.updateUser(User user, boolean merge) 


Hope it helps.