#1....why would you pay the HOA anything? They may have some claim to the money, but they didn't likely own the house, they had a lien against the house. Your lease was not with them. There can be all kinds of liens on the house, mortgage, HOA, plumbers, contractors, IRS, Homeland Security.... just because they have a lien doesn't mean you should pay them rent???
However, now that you have paid them rent, they may not owe it back to you. Your claim would be with the landlord, not the HOA in my non-legal opinion. They have probably credited your payments against the lien, which was good for them, but not necessarily in your interest....or maybe it was since you got to stay there another year or two.
You might want legal advice...not advice from us. I probably would not pay rent to anyone at this point until you are contacted and a contract/lease in place. You should probably save the rent in case you do have to pay. My guess is your current lease has expired, if it has been two years or more since you originally signed, or you are now on month-to month. So potentially the new owner will want to sign a lease with you....or take possession of the house. If the 2nd scenario then they would have to give you the notice required in your lease if the lease is valid. If you don't have a lease, then it would be according to CA law, I'm guessing 30days...but maybe some of our CA people can jump in on this one. So you also want to be prepared to move. If you are contacted by the new owner...work with them. You don't want them to evict you.....you might be able to stay, but your rent may go up or they might ask you to leave....so you just have to be prepared for that.
The HOA should know who the new owner is and the HOA lien was probably wiped out in the foreclosure or settled. Since you have a relationship with them, you might be proactive and get the contact info for the new owner, contact them before they contact you. Tell them you want to sign a new lease, if that is the case.
By the way if you had a deposit, that is probably gone. You might contact the landlord and ask for it back, but they may not have any money, if they were taking your rent and not paying their mortgage.