@Patrick Jacques
In both cases, these are actions the landlord is allowed to take. It isn't financially responsible, but this landlord wouldn't be the first person to not pay his mortgage. And if the landlord can sell the place, that might just the be the best way for the landlord to get out of a financial hole.
Typically, the law is on the side of the renter e.g. if someone purchases the property, the tenant is allowed to stay, at least until the end of their lease or the legally allowed notice period. A local tenants association or a google search will answer that question.
That being said, it doesn't sound like the best situation and I would probably advise your friend to start looking for a new home. Who knows what will happen if the house is auctioned off or sold and what the new owner may be like. Hopefully the landlord has your friend's deposit money in an escrow account and will be able to pay it back on move out day.