Hello. I will try to assist you.
Generally, when a new owner purchases real property he buys it subject to any leases then in effect. So if someone buys a property with a tenant who is in the middle of an enforceable lease for a set term, the new owner would have to wait until the expiration of that lease before he serves a proper notice to vacate advising the tenant the lease is coming to an end and will not be renewed and you are obligated to move out.
In this case, you seem to indicate the property was owned by you but was foreclosed upon, is that correct? First, foreclosures typically wipe out all subordinate interests and liens on a property, which includes residential leases. Was the property actually foreclosed on? If so, your lease is no longer enforceable and the new owner can evict you.
If it never actually went to foreeclosure you can argue the lease is enforceable, but you are likely to still have problems. You indicate the landlord who made this lease agreement with you was a "temporary owner." If this was a maneuver done solely to avoid the effects of the foreclosure and allow you to continue to reside there, the new owner's attorney will likely argue the "temporary owner" was never truly an actual owner and that this lease is not an enforceable agreement. He could take you to court over the matter to seek your removal.
Questions the court will have are how long this "temporary owner" actually owned the property, what did he/she buy it for, was the property sold or transferred to them after foreclosure proceedings were initiated, is there anything in writing and recorded showing an actual transfer of title to the temporary owner, etc.