Simak bin Harb narrates from Sayyiduna Nu'man bin Bashir (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) was straightening the rows. He (peace and blessings be upon him) saw a man sticking out of the row and said: "Straighten your rows, or else Allah will cause discord between your faces on the Day of Resurrection."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5181