Any person, whether the owner or lessee of the property leased, who or which has or hereafter shall have received from a tenant or licensee a sum of money as a deposit or advance of rental as security for the full performance by such tenant or licensee of the terms of his contract, lease or license agreement, or who or which has or shall have received the same from a former owner or lessee, shall, upon conveying such property or assigning his or its lease to another, or upon the conveyance of such property to another person by a court in an action to foreclose a mortgage thereon, at the time of the delivery of the deed or instrument of assignment, or within five days thereafter, or in the event of the insolvency or bankruptcy of the person receiving said deposit, within five days after the making and entry of an order of the court discharging the receiver or trustee, deal with the security deposit by turning over to his or its grantee or assignee, or to the purchaser at the foreclosure sale the sum so deposited, plus the tenant's portion of the interest or earnings accumulated thereon, and notify the tenant or licensee by registered or certified mail of such turning over and the name and address of such grantee, assignee or purchaser. Notwithstanding any other provision of law to the contrary, it shall be the duty and obligation of the grantee, assignee or purchaser to obtain from the grantor who is the owner or lessee at the time of the transfer, conveyance or purchase any and all security deposits, plus accrued interest on the deposits, that the owner or lessee received from a tenant, licensee or previous owner or lessee, and which deposits were invested, or should have been invested, in the manner required by section 1 of P.L. 1967, c. 265 (C.46:8-19).
N.J.S. § 46:8-20