get_lockout_message_if_locked

Function get_lockout_message_if_locked 

Source
pub fn get_lockout_message_if_locked(
    username: &str,
    app: &AppState,
) -> Option<String>
Expand description

What: Check if user is locked out and return lockout message if so.

Inputs:

  • username: Username to check.
  • app: Application state for translations.

Output:

  • Some(message) if user is locked out, None otherwise.

Details:

  • Checks faillock status and returns formatted lockout message if locked.
  • Returns None if not locked or if check fails.
  • Uses translations from AppState.