It is provided by statute that unless a tax or assessment, or some part thereof, be illegal or invalid or levied or assessed for an illegal or unauthorized purpose, no injunction shall be granted by any court or judge to restrain the collection thereof in whole or in part, and that if any person shall have a valid defense to the enforcement of a tax or assessment which is not illegal or unauthorized, he shall pay such tax or assessment to the sheriff and afterwards seek to recover it in accordance with the statutory method. C. S., 7979. The statute has been so frequently considered and explained as to call for the citation of no decisions pointing out the necessity of alleging, when an injunction is sought, that the tax or assessment is illegal or invalid or levied or assessed for an illegal or unauthorized purpose. As to this it is sufficient to say that there is no such allegation in either cause of action. Notwithstanding the want of such an allegation the plaintiff impeaches the authority of the defendant to make the sale. In 1923 the Legislature enacted a statute conferring upon sheriffs and tax collectors authority to collect arrears of taxes for the years 1917 to 1922; in 1925 the time was extended to 1923 and 1924; and in 1927 to. 1925 and 1926,. the authority thus conferred to cease and determine on the first day of January, 1929. 3 C. S., 8005(a), (b), (e), (d) ; Laws 1925, ch. 80; Laws 1927, ch. 89. The obvious purpose of the act of 1927 was to continue in effect until the first day of January, 1929, the power theretofore conferred upon sheriffs and tax collectors by the acts of 1923 and 1925. That the General Assembly has power to enact legislation of this character is not to be questioned. R. R. v. Comrs., 82 N. C., 259; Johnson v. Royster, 88 N. C., 194; Jones v. Arrington, 91 N. c., 125; ibid., 94 N. C., 541; Wilmington v. Cronly, 122 N. C., 383; Lumber Co. v. Smith, 146 N. C., 199.
The plaintiff bases her action chiefly upon the allegation that the defendant, knowing that Nicholls had agreed to pay the tax, indulged him from time to time, and finally settled with the county for all taxes due for 1923 and 1924, and thereby extinguished all liens upon her lánd for unpaid taxes, and that the defendant must seek his remedy in an action against the estate of Nicholls. We entertain a different opinion. The rental contract between the plaintiff and Nicholls did not relieve the plaintiff of the duty to see that her taxes were paid. She *268could not excuse ber delay by pleading tbe sheriff’s failure to notify her that her taxes were due. If the tax assessed against her land was not paid the lien continued in effect. From a legal viewpoint the tax debtor was the plaintiff, not Nicholls; and for this reason the principle upon which Kerner v. Cottage Co., 123 N. C., 294, was decided is not applicable. The sheriff’s settlement with the county did not extinguish the delinquent taxpayer’s liability. Jones v. Arrington, supra; Berry v. Davis, 158 N. C., 170.
The only additional allegation in the second cause of action which may be regarded as material is this: some time in the year 1927 the plaintiff paid to the defendant “under protest” the taxes assessed against her property in 1925 and 1926, “and has since demanded a return of the same.” This evidently is insufficient. There is no allegation, as the -statute requires, that a written notice of the protest was given the defendant or that a written demand for repayment was made within thirty days after payment upon the treasurer of the State or county. The provision is that if a tax which is paid under protest in the method prescribed is not refunded upon legal demand, the taxpayer may sue the county, city, or town by whose authority or for whose benefit the tax was levied; but there is no authority for such a suit against the sheriff. Ragan v. Doughton, 192 N. C., 501; R. R. v. Comrs., 188 N. C., 265; Murdock v. Comrs., 138 N. C., 124; Purnell v. Page, 133 N. C., 125. Indeed, the plaintiff admits that she cannot maintain an action to recover the amount alleged to have been paid under protest. This judgment is
Affirmed.