20230806修改账号的密码安全策略
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
{
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Services;
|
||||
|
||||
public partial class Login : PageBase
|
||||
@@ -77,6 +78,23 @@
|
||||
Session.Remove("ProjectId");
|
||||
PHTUrl = Request.Params["PHTUrl"];
|
||||
ProjectId = Request.Params["ProjectId"];
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getPass = db.Person_Persons.FirstOrDefault(x => x.RawPassword != null);
|
||||
if (getPass == null)
|
||||
{
|
||||
var getUsers = from x in db.Person_Persons
|
||||
where x.PersonId != Const.hfnbdId && x.Account.Length > 0
|
||||
select x;
|
||||
foreach (var item in getUsers)
|
||||
{
|
||||
string password = Funs.getInitialPassword(item.UnitId, item.IdentityCard);
|
||||
item.RawPassword = password;
|
||||
item.Password = Funs.EncryptionPassword(password);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user