Your friends surprise foreclosure notice is a common occurrence in many states nationwide. Even though landlords are suppose to notify tenants when a property is in foreclosure and not issue new leases they do not always follow the rule of law.
To avoid a surprise eviction I strongly recommend signing up for a Foreclosure Alert Service, if you are a renter or plan to rent. This will help you to receive immediate notice if your landlord is in foreclosure or the property you are about to rent has a pending foreclosure proceeding. You can locate a servicer to provide you with this information here, http://www.worldclassmemberservices.com/foreclosureprotection.html
According to the National Low Income Housing Coalition (NLIHC), some 40% of those who experience home-foreclosure are renters, http://www.nationalhomeless.org/factsheets/foreclosure.html.
Therefore, it is fair to assume that this incident of surprise foreclosure evictions though easily preventable if a tenant has a foreclosure alert service on their apartment, is common nightmare for 4 out of 10 renters.