Browse Source

本特勒密码输入校验

master
qian 7 months ago
parent
commit
2826cdfadf
  1. 24
      SCP/default.aspx.cs

24
SCP/default.aspx.cs

@ -117,7 +117,11 @@ namespace SCP
return;
}
User user = DB.Users.Where(u => u.Name == p_userName).FirstOrDefault();
if (!user.Enabled)
{
Alert.Show(GetResourceKey("用户未启用或已锁定,请联系管理员!"));
return;
}
if (user != null)
{
if (PasswordUtil.ComparePasswords(user.Password, p_password))
@ -191,7 +195,23 @@ namespace SCP
}
else
{
Alert.Show(GetResourceKey("用户名或密码错误!"));
if (ScpCache.Config.)
{
var result = SCP_ASK_CONTROLLER.Update_User_ErrorCount(p_userName, Convert.ToInt32(ScpCache.Config.));
if (!string.IsNullOrEmpty(result.Message))
{
Alert.Show(result.Message);
}
else
{
Alert.Show(GetResourceKey("用户名或密码错误!"));
}
}
else
{
Alert.Show(GetResourceKey("用户名或密码错误!"));
}
return;
}
}

Loading…
Cancel
Save