Reputation: 3130
I've built a portlet that can administrate users in Liferay.
One of the options I'm looking to implement is the ability to Lock and unlock users using the password lockout.
When I try and update the lockout it does nothing, I'm using the following:
UserLocalServiceUtil.updateLockoutById(userId, true)
This doesn't throw an exception or log a fault, it looks as though everything went well but the database is not updated and the user account is unaffected.
What's going on? Am I missing something? The JavaDoc is pretty clear.
Note: I'm not trying to deactivate the account, only lock out and unlock the user.
Upvotes: 4
Views: 1185
Reputation: 66
In the password policy you must specify the "Lockout Enabled" option as enabled otherwise the method will do nothing.
Upvotes: 5