(a) A defendant who is in actual possession may, for answer, plead that he is in possession only as tenant of another, naming him and his place of residence. Thereupon the landlord, if he applies therefor, shall be made defendant in place of the tenant, and the action shall proceed in all respects as if originally commenced against him. If the landlord does not apply to be made defendant within the time the tenant is allowed to answer, thereafter he shall not be allowed to, but he shall be made defendant if the plaintiff requires it. If the landlord is made defendant on motion of the plaintiff he shall be required to appear and answer within 20 days from notice of the pendency of the action and the order making him defendant, or such further time as the court prescribes.
(b) In an action against a tenant, the judgment shall be conclusive against the landlord, who has been made defendant in place of the tenant, to the same extent as if the action had been originally commenced against the landlord.