20230806修改账号的密码安全策略

This commit is contained in:
2023-08-06 22:38:05 +08:00
parent f13d77c520
commit 2804d7c4df
15 changed files with 189 additions and 174 deletions
@@ -98,10 +98,13 @@
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.Person_PersonsService.UpdatePassword(rowID, BLL.Const.Password);
{ var getperson = Person_PersonsService.GetPerson_PersonsById(Grid1.DataKeys[rowIndex][0].ToString());
if (getperson != null)
{
BLL.Person_PersonsService.UpdatePassword(getperson.PersonId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard));
}
}
BindGrid();
ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
}
@@ -89,6 +89,12 @@ namespace FineUIPro.Web.SysManage
return;
}
if (this.txtNewPassword.Text.Length < 8 || !Funs.IsValIDPassword(this.txtNewPassword.Text))
{
Alert.ShowInParent("密码长度至少8位且必须包含字母、数字、特殊符号!");
return;
}
BLL.Person_PersonsService.UpdatePassword(user.PersonId, this.txtNewPassword.Text);
BLL.LogService.AddSys_Log(this.CurrUser, "修改密码", string.Empty, BLL.Const.UserMenuId, Const.BtnModify);