public void LockUser(int userID, bool lockThisUser) { var oldUser = Static_User_DAL.Select(userID); if (oldUser != null) { oldUser.IsLockedOut = lockThisUser; Static_User_DAL.Update(oldUser); } }
public void ModifyPassword(UserInfo user, string plainOldPassword, string plainNewPassword) { var hashedOldPwd = Static_Hash_Cryptorgrapher.CreateHash(plainOldPassword); var hashedNewPwd = Static_Hash_Cryptorgrapher.CreateHash(plainNewPassword); Static_User_DAL.Update(user.UserName, hashedOldPwd, hashedNewPwd); user.EncryptedPassword = hashedNewPwd; user.LastPwdChangedDate = DateTime.Now; }
public void ModifyUser(UserInfo user) { // 检查新的编号是否已被使用 var oldUser = Static_User_DAL.SelectByName(user.UserName); if (oldUser != null && oldUser.ID != user.ID) { throw new Exception("新修改的会员账号已存在,无法修改当前会员的账号!"); } Static_User_DAL.Update(user); }
public void ModifyUserPopedom(UserInfo user) { Static_User_DAL.Update(user); }