; and (ii) has provided the tenant a notice to vacate at least 90 days before the effective date of such notice. ; and (2) by inserting at the end of subparagraph (F) the following: In the case of any foreclosure on any federally-related mortgage loan (as that term is defined in section 3 of the Real Estate Settlement Procedures Act of 1974 ( 12 U.S.C. 2602 )) or on any residential real property in which a recipient of assistance under this subsection resides, the immediate successor in interest in such property pursuant to the foreclosure shall assume such interest subject to the lease between the prior owner and the tenant and to the housing assistance payments contract between the prior owner and the public housing agency for the occupied unit, except that this provision and the provisions related to foreclosure in subparagraph (C) shall not shall not affect any State or local law that provides longer time periods or other additional protections for tenants. . (c) Rulemaking The Secretary of Housing and Urban Development shall, not later than the end of the 12-month period beginning on the date of the enactment of this Act, issue regulations to carry out this section and the amendments made by this section, and the Secretary shall provide that such regulations take effect not later than the end of the 6-month period beginning on the date the regulations are issued. 5. Rule of Construction Nothing in this Act, or the amendments made by this Act, shall be construed as preempting any State or local law with respect to foreclosures that provides greater protections for consumers. 6. Rulemaking Except with respect to section 4, the Bureau of Consumer Financial Protection shall, not later than the end of the 12-month period beginning on the date of the enactment of this Act, issue regulations to carry out this Act and the amendments made by this Act, and the Bureau shall provide that such regulations take effect not later than the end of the 6-month period beginning on the date the regulations are issued.