CAL. CCP. CODE § 564 : California Code - Section 564

(a) A receiver may be appointed, in the manner provided in this chapter, by the court in which an action or proceeding is pending in any case in which the court is empowered by law to appoint a receiver.

(b) A receiver may be appointed by the court in which an action or proceeding is pending, or by a judge thereof, in the following cases:

(1) In an action by a vendor to vacate a fraudulent purchase of property, or by a creditor to subject any property or fund to the creditor's claim, or between partners or others jointly owning or interested in any property or fund, on the application of the plaintiff, or of any party whose right to or interest in the property or fund, or the proceeds thereof, is probable, and where it is shown that the property or fund is in danger of being lost, removed, or materially injured.

(2) In an action by a secured lender for the foreclosure of a deed of trust or mortgage and sale of property upon which there is a lien under a deed of trust or mortgage, where it appears that the property is in danger of being lost, removed, or materially injured, or that the condition of the deed of trust or mortgage has not been performed, and that the property is probably insufficient to discharge the deed of trust or mortgage debt.

(3) After judgment, to carry the judgment into effect.

(4) After judgment, to dispose of the property according to the judgment, or to preserve it during the pendency of an appeal, or pursuant to the Enforcement of Judgments Law (Title 9 (commencing with Section 680.010)), or after sale of real property pursuant to a decree of foreclosure, during the redemption period, to collect, expend, and disburse rents as directed by the court or otherwise provided by law.

(5) Where a corporation has been dissolved, as provided in Section 565.

(6) Where a corporation is insolvent, or in imminent danger of insolvency, or has forfeited its corporate rights.

(7) In an action of unlawful detainer.

(8) At the request of the Public Utilities Commission pursuant to Section 855 or 5259.5 of the Public Utilities Code.

(9) In all other cases where necessary to preserve the property or rights of any party.

(10) At the request of the Office of Statewide Health Planning and Development, or the Attorney General, pursuant to Section 129173 of the Health and Safety Code.

(11) In an action by a secured lender for specific performance of an assignment of rents provision in a deed of trust, mortgage, or separate assignment document. The appointment may be continued after entry of a judgment for specific performance if appropriate to protect, operate, or maintain real property encumbered by a deed of trust or mortgage or to collect rents therefrom while a pending nonjudicial foreclosure under power of sale in a deed of trust or mortgage is being completed.

(12) In a case brought by an assignee under an assignment of leases, rents, issues, or profits pursuant to subdivision (g) of Section 2938 of the Civil Code.

(c) A receiver may be appointed, in the manner provided in this chapter, including, but not limited to, Section 566, by the superior court in an action brought by a secured lender to enforce the rights provided in Section 2929.5 of the Civil Code, to enable the secured lender to enter and inspect the real property security for the purpose of determining the existence, location, nature, and magnitude of any past or present release or threatened release of any hazardous substance into, onto, beneath, or from the real property security. The secured lender shall not abuse the right of entry and inspection or use it to harass the borrower or tenant of the property. Except in case of an emergency, when the borrower or tenant of the property has abandoned the premises, or if it is impracticable to do so, the secured lender shall give the borrower or tenant of the property reasonable notice of the secured lender's intent to enter and shall enter only during the borrower's or tenant' s normal business hours. Twenty-four hours' notice shall be presumed to be reasonable notice in the absence of evidence to the contrary.

(d) Any action by a secured lender to appoint a receiver pursuant to this section shall not constitute an action within the meaning of subdivision (a) of Section 726.

(e) For purposes of this section:

(1) "Borrower" means the trustor under a deed of trust, or a mortgagor under a mortgage, where the deed of trust or mortgage encumbers real property security and secures the performance of the trustor or mortgagor under a loan, extension of credit, guaranty, or other obligation. The term includes any successor in interest of the trustor or mortgagor to the real property security before the deed of trust or mortgage has been discharged, reconveyed, or foreclosed upon.

(2) "Hazardous substance" means any of the following:

(A) Any "hazardous substance" as defined in subdivision (h) of Section 25281 of the Health and Safety Code.

(B) Any "waste" as defined in subdivision (d) of Section 13050 of the Water Code.

(C) Petroleum including crude oil or any fraction thereof, natural gas, natural gas liquids, liquefied natural gas, or synthetic gas usable for fuel, or any mixture thereof.

(3) "Real property security" means any real property and improvements, other than a separate interest and any related interest in the common area of a residential common interest development, as the terms "separate interest," "common area," and "common interest development" are defined in Section 1351 of the Civil Code, or real property consisting of one acre or less that contains 1 to 15 dwelling units.

(4) "Release" means any spilling, leaking, pumping, pouring, emitting, emptying, discharging, injecting, escaping, leaching, dumping, or disposing into the environment, including continuing migration, of hazardous substances into, onto, or through soil, surface water, or groundwater.

(5) "Secured lender" means the beneficiary under a deed of trust against the real property security, or the mortgagee under a mortgage against the real property security, and any successor in interest of the beneficiary or mortgagee to the deed of trust or mortgage.