public bool SetPassword(string UserName, string password) { byte[] encPassword = AccountsPrincipal.EncryptPassword(password); bool result = this.dataUser.SetPassword(UserName, encPassword); if (result) { User nu = new User(UserName); UserLogin u = new UserLogin(); u.UserId = nu.UserID; u.UserName = nu.UserName; u.Password = nu.NonEncryptPasswordPassword; u.Email = nu.Email; D4DGateway.UserProvider.SetUserLogin(u); } return(result); }
public bool SetPassword(string UserName, string password) { byte[] encPassword = AccountsPrincipal.EncryptPassword(password); Data.User user = new Data.User(PubConstant.ConnectionString); return(user.SetPassword(UserName, encPassword)); }
/// <summary> /// 设置用户密码 /// </summary> public bool SetPassword(string UserName, string password) { byte[] cryptPassword = AccountsPrincipal.EncryptPassword(password); return(dataUser.SetPassword(UserName, cryptPassword)); }