delivered the opinion of the court:
The plaintiff states in her petition that the defendant is indebted to her in the sum of $160, being the price of a land warrant which belonged to the plaintiff, and which the defendant had sold for her at that price; that the plaintiff was indebted to. James Harmon, and had assigned to him by a written assign*128ment, which is exhibited with the petition, the debt due from the defendant; and she therefore sues for the use of said Harmon.
The defendant answered, admitting that he sold the warrant for the plaintiff at the price stated; but alleging, that after the assignment in favor of Harmon had been executed and presented to him, he saw the plaintiff, who told defendant not to pay the amount to Harmon, as she was mistaken as to the amount for which the assignment was drawn.
To this answer the plaintiff demurred, the demurrer was overruled, and judgment rendered for the defendant in bar of the action. From that judgment the plaintiff has appealed, insisting that the defense set up in the answer is insufficient.
We deem it unnecessary to consider the question arising on the demurrer, inasmuch as, upon the whole record, the judgment is obviously right, and must therefore be affirmed.
By the Civil Code, (sec. 30,) “ every action must be prosecuted in the name of the real party in interest, except as provided in section 33.” By the latter section executors, administrators, guardians, trustees of an express trust, persons with whom contracts may be made for the benefit of another, or persons expressly authorized by statute to do so, may bring an action without joining the person for whose benefit it is prosecuted.
Upon the face of the petition in this case it is perfectly clear that the plaintiff was not the owner of the debt for the recovery of which the action is brought; but that Harmon is the equitable owner of i.t, and he is therefore the real party in interest; and under the plain rule of practice referred to, the action should have been prosecuted in his name as plaintiff. It is true that, according to section 31, the assignor, Mrs. Lytle, was a necessary party, as plaintiff or defendant, as the assignment was not authorized by statute, and did not invest the assignee with the legal title to the debt assigned.
In the caption, as well as in the body of the petition, the name of Harmon is mentioned as the person for whose use the .action is brought; but he did not thereby become, either substantially or formally, a. party'to the action. Under the law, as it stood prior to the adoption of the Code, a different rule of *129practice prevailed, because no one but the legal owner of a chose in action could prosecute an action at law for its recovery; and in cases where another person was the equitable owner of the demand, the suit was usually and properly brought for the use of such equitable owner. This rule exists no longer, and the requirements of the Code, by which it has been superseded, are imperative, and ihust be pursued. (Wilkes, &c., vs. Morehead, MS. opinion, 1856.).
It follows that as the petition itself disclosed the fact that the plaintiff was not entitled to the debt sued for, but that the right of action was in another, no valid judgment could have been rendered against the defendant; and upon that ground alone the judgment in his favor must be affirmed.