public static DateTime GetLastPasswordFailureDate(string userName) { ExtendedMembershipProvider provider = VerifyProvider(); Debug.Assert(provider != null); // VerifyProvider checks this return(provider.GetLastPasswordFailureDate(userName)); }
internal static bool IsAccountLockedOutInternal(ExtendedMembershipProvider provider, string userName, int allowedPasswordAttempts, TimeSpan interval) { return(provider.GetUser(userName, false) != null && provider.GetPasswordFailuresSinceLastSuccess(userName) > allowedPasswordAttempts && provider.GetLastPasswordFailureDate(userName).Add(interval) > DateTime.UtcNow); }