From Chris Combs‘ e-bulletin (I can’t find it on his website).
For example, if a residential tenant signs a bona fide 2-year lease the day before the Trustee’s Sale, the residential tenant would be entitled to stay in the home for the entire two years, provided that the tenant makes rent payments to the bank or other new owner.
I, however, have heard horror stories of the new owner bullying the tenant out, including physically intimidating a friend of mine (who is also Realtor!).
Those landlords should be punished. Of course the new landlord can alway buy out the tenant but many have simply decided it’s cheaper to bully and intimidate the tenant out.