You are viewing limited content. For full access, please sign in.

Question

Question

Any ways to get Laserfiche Directory account lock status in batch?

asked on February 14, 2023

We have a customized a LFDS account admin page showing lock status (e.g. entered wrong password more than 3 times) by querying SDK LaserficheUser.Locked properties.

 

However there is performance issue when show Locked status for all accounts while run the SDK query one-by-one.

 

Is there any way to query all account Locked status in batch? Or where to lookup in LFDS database?
 

Thank you.

0 0

Answer

SELECTED ANSWER
replied on February 15, 2023 Show version history

Hi Kenneth,

You can query the "directory_objects" table of the LFDS database. The column you're interested in is called "login_fail_count", as well as possibly "last_login_fail_time".

LFDS dynamically evaluates user account Locked status using those values through an internal function that's called on relevant actions, such as retrieving account details in the web admin UI (or via SDK) or the user attempting to log in. There is no specific "Locked" value in the LFDS database to query directly.

Here is pseudocode for queries to return Locked user accounts:

SELECT 'name'
FROM 'directory_objects'
WHERE 'login_fail_count' >= $permanentLockoutFailedAttemptThreshold
# and/or
WHERE 'login_fail_count' >= $temporaryLockoutFailedAttemptThreshold AND 'last_login_fail_time' <= ($currentTime - $temporaryLockoutDuration)

A different database table (not sure offhand) has the temporary and permanent lockout configuration settings if you want to get the fail attempt thresholds and temp lockout duration dynamically. Poke around for anything that sounds like it deals with password settings.

0 0

Replies

replied on February 15, 2023

Hi Samuel,

 

Checked the SQL should work. Thanks a lot!

1 0
replied on February 16, 2023

Welcome! Once you have it working, could you post the actual SQL query/queries here for the community's benefit?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.