Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vikas V
Lockout Enabled - Not working
March 14, 2012 6:50 AM
Answer

Vikas V

Rank: Junior Member

Posts: 83

Join Date: September 28, 2011

Recent Posts

Hi,

Am using Liferay 6.0

I want to 'intentionally' lock user's account because of some Business requirements.

So, I thought of making use of Lockout option in USER_ table. Idea is I will manually update FailedLoginAttempts in USER_ table for the user whom I dont want to login.

So, in admin port I configured (in Password Policies) , as per the screen shot I have attached.

I ll update manually FailedLoginAttempts field for the user with a number above 999. But the user is getting logged in.

I also tried making LOCKOUT field value 1. But it got logged in.

I had restarted my server after doing changes in admin port.

Where did I miss out? Or are there any other way to intentionally block users from logging in? Are there any more entries to be made in portal-ext.properties?

Regards,

Vikas
Attachment

Attachments: LockOut.JPG (55.5k)
David H Nebinger
RE: Lockout Enabled - Not working
March 14, 2012 7:15 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

You should not manually be update the column in the database as the users can actually be cached in Lucene (which is why sometimes when users are added you need to go to the server control panel and reindex all search indexes).

Only use the Liferay approved apis for making changes to users. It's the only way to ensure that all the Liferay entities related to a user are updated and synchronized.
Hitoshi Ozawa
RE: Lockout Enabled - Not working
March 17, 2012 7:21 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

You have to set LOCKOUTDATE with LOCKOUT and I'm not sure why you're setting Maximum Failure to 999 to test this. Just set it to 1.
Anyways, as David said, you shouldn't be modifying Liferay database directly.
Riccardo Ferrari
RE: Lockout Enabled - Not working
March 18, 2012 2:41 AM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

I agree that db columns should never get modified by hand. In case you need to empty the db cache from "Control Panel" -> "Server Administration"