Skip to main content

unlock

Function unlock 

Source
pub async fn unlock(db: &Db, target_user_id: i64) -> Result<UnlockOutcome>
Expand description

Clear locked_until and reset failed_login_count = 0 on the target. Does NOT touch sessions — an unlock is not a session event per DESIGN_R4_EMERGENCY.md §7.

Returns previously_locked so the CLI can render “the account was indeed locked, now cleared” vs. “the account was already open, this was a no-op” without an extra round-trip.