Esempio n. 1
0
        public static int GetPasswordFailuresSinceLastSuccess(string userName)
        {
            ExtendedMembershipProvider provider = VerifyProvider();

            Debug.Assert(provider != null); // VerifyProvider checks this

            return(provider.GetPasswordFailuresSinceLastSuccess(userName));
        }
Esempio n. 2
0
 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);
 }