Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Daniel Breitner
Updating User Lockout
September 17, 2008 5:55 AM
Answer

Daniel Breitner

Rank: Junior Member

Posts: 88

Join Date: July 16, 2008

Recent Posts

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
RE: Updating User Lockout
November 14, 2012 3:50 AM
Answer

Alex Bu

Rank: New Member

Posts: 1

Join Date: September 18, 2012

Recent Posts

Same question!
Bart Simpson
RE: Updating User Lockout
November 14, 2012 5:56 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 522

Join Date: August 29, 2011

Recent Posts

If you digg into the code you'll find that the model is updated but not merged with the current session.
1userPersistence.update(user, false);

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


Hope it helps.