When it was the Day of the Battle of the Ditch I and 'Umar b. Salama were in the fort in which there were women, i. e. the wives of Allah's Apostle (ﷺ) ; the rest of the hadith is the same.
Reference: Sahih Muslim 2416 b In-book : Book 44, Hadith 76 USC-MSA web (English) : Book 31, Hadith 5941 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.