The prayer was called, so the Prophet ﷺ stood and turned his face toward us and said, "Straighten your rows and stand close together, for I can see you from behind my back."
حدثنا ابن أبي عدي عن حميد
أقيمت الصلاة فقام النبي ﷺ فأقبل علينا بوجهه فقال أقيموا صفوفكم وتراصوا فإني أراكم من وراء ظهري
Its isnad is sahih. It is found in Bukhari 1/184, in the Book of Prayer, chapter on the imam turning to face the people, and in Nasai 2/292, no. 814, in the Book of Leadership in Prayer, chapter on the imam urging the straightening of the rows.