The attornment of a tenant to any stranger shall be void, unless it be with the consent of the landlord of such tenant or pursuant to or in consequence of the judgment, order or decree of a court. History Code 1919, § 5515.