Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions MySql.Web.Extension/MySql.Web.Security/MySqlWebSecurity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
/* Purpose : Provides security and authentication features for ASP.NET Web Pages applications with MySql, including the ability to create user accounts,
* log users in and out, reset or change passwords, and perform related tasks.
/*--------------------------------------------------------------------------------------------------------------------*/
/* Modifier :
/* Update :
/* Changes :
/* Modifier : Phoenix
/* Update : 2013-10-31
/* Changes : Add account locked out check when login
/*--------------------------------------------------------------------------------------------------------------------*/
/* Comment :
/*--------------------------------------------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -268,6 +268,10 @@ private static MySqlSimpleRoleProvider CreateDefaultExtendedRoleProvider(string
public static bool Login(string userName, string password, bool persistCookie = false)
{
MySqlSimpleMembershipProvider provider = VerifyProvider();
// Add By Phoenix 2013-10-31
// Check is account locked out
if (IsAccountLockedOut(userName, provider.PasswordAttemptWindow, provider.MaxInvalidPasswordAttempts))
return false;
bool success = provider.ValidateUser(userName, password);
if (success)
{
Expand Down