C.C.P. § 1161b requires a 90 day written notice to quit to be served upon a tenant or subtenant before they can be removed from the property where the property is sold pursuant to a foreclosure.
If the tenant in the foreclosure has a month to month or periodic tenancy then the landlord may simply comply with the 90 day notice.
If the tenant in the foreclosure has a fixed-term lease in place, then that fixed-term lease will survive the foreclosure (i.e., new owner has to honor the terms thru the lease term) except when any of the following conditions apply:
(1) The purchaser or successor in interest will occupy the housing unit as a primary residence.
(2) The lessee is the mortgagor or the child, spouse, or parent of the mortgagor.
(3) The lease was not the result of an arms’ length transaction.
(4) The lease requires the receipt of rent that is substantially less than fair market rent for the property, except when rent is reduced or subsidized due to a federal, state, or local subsidy or law.
If any of the above 4 conditions apply, then the landlord can just go with the 90 day notice, but the landlord retains the burden of proof at trial to demonstrate one of the 4 conditions mentioned above.
Also, local rent control will kick in and limit a landlord’s ability to evict to only “just cause” evictions. Local rent control ordinances such as the Los Angeles Rent Stabilization Ordinance may limit the reasons for eviction.