Any time after an action to foreclose a mortgage or deed of trust is brought, and prior to the sale, a person having a junior lien on the property shall be entitled to an assignment of all the interest of the holder of the mortgage or deed of trust by paying him the amount secured, with interest and costs, together with the amount of any other superior liens of the same holder. The assignee may then continue the action in his name.
A.R.S. § 33-723