It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Does the one who raises his head before the imam not fear that Allah will turn his head into the head of a donkey?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2599