The purchaser, from the time of sale until a resale or a redemption, or a redemptioner, from the time of redemption until another redemption, is entitled to the possession of the property purchased or redeemed. Where the property is in the possession of a tenant, the purchaser or redemptioner is entitled to receive the rents of the property or the value of the use and occupation of the property.