The person actually occupying the premises and any person claiming title thereto or claiming any interest therein adversely to the plaintiff may also, at the discretion of the plaintiff, be named defendants in the action. If there be no person actually occupying the premises adversely to the plaintiff, then the action must be against some person exercising ownership thereon or claiming title thereto or some interest therein at the commencement of suit. If a lessee be made defendant at the suit of a party claiming against the title of his landlord such landlord may appear and be made a defendant with or in place of his lessee.
Code 1950, § 8-800; 1954, c. 333; 1977, c. 617.