Where the tenancy was created before the mortgage, and so at the time of the mortgage there was a tenant in possession, the mortgagee can take possession of the mortgaged property by giving notice to the tenant to pay the rent to him or her. After the notice is served, the mortgagee is entitled to the rents and profits accruing. In fact, the mortgagee may demand payment of all arrears of rent due at the date of taking possession.
Where the tenant has paid the rent in advance to the mortgagor, the mortgagee, on going into possession may demand payment over again (see Reeves v Pope  2 KB 284), unless payment in advance was made before the creation of the mortgage.
If a tenancy is created after the mortgage, unless the mortgagee consents to the tenancy, any lease will not be binding on the mortgagee.
Where the tenancy is not binding on the mortgagee, the mortgagee can obtain physical possession of the property either by court order or by changing the locks (if a confrontation can be avoided).
In SEAA Enterprises Pty Ltd v Figgins Holdings Pty Ltd  2 VR 90, the Court of Appeal ruled on a dispute between a mortgagee and a tenant.
In that case, the lease in question was created before the mortgage. As a result, the lender took the land subject to the interest of the tenant in possession pursuant to section 42(2)(e) of the Transfer of Land Act, 1958.
After the borrower defaulted under the terms of the mortgage, the borrower, as landlord, and the tenant purported vary the terms of the lease.
The leading judgment of the Court of Appeal was handed down by Brooking JA (with whom Winneke P and Charles JA agreed). Among other things, Brooking JA held (at VR 100):
Payment of rent in advance did not discharge the obligation until the rent fell due. The receipt of the rent in advance could not be treated as a discharge by the landlord because it was received after he had assigned the reversion and so lost the power to give a discharge.And at VR 102:
The result of the authorities is that if there is an arrangement whereby rent is paid in advance or future rent is to be set off against money due to the tenant from the mortgagor, this arrangement will, whether it was made before or after the mortgage, have the result that the tenant must be taken, as against the mortgagee, to have paid the rent in respect of such amounts as fell due before the mortgagee gave notice to the tenant to pay rent to him.
As regards amounts of rent which fall due after the mortgagee gives notice to the tenant to pay rent to him, the effect of the arrangement will depend on when it was made. If ... before the mortgage, it will ... bind the mortgagee. ... If the arrangement is made after the mortgage, then, whether or not the mortgage is a registered mortgage of land under the [Transfer of Land] Act, the arrangement does not bind the mortgagee. ... If the arrangement is subsequent to the mortgage, then the only defence to an action by the mortgagee for rent is that of payment.In that case, the Court of Appeal decided that after notice was given by the mortgagee to pay the rent to its receiver, the mortgagor could not give a good discharge for the rent.
As a result, the tenant was obliged to pay the rent again to the mortgagee, even though it had paid the (varied) rent to the mortgagor.
The result of the authorities is that when a tenant rents premises that are mortgaged, there are inherent risks associated with paying rent to a landlord who may not meet its obligations to a lender. The main risk (eviction) can be avoided by obtaining the consent of the lender to the lease, including an acknowledgment that the lender will accept the validity of the lease.
W G Stark
Hayden Starke Chambers