Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates: The Prophet (peace and blessings be upon him) said: "Does the one who raises his head before the imam feel safe from Allah Almighty changing his head into the head of a dog?" I say: This hadith is in the Sahih, except that it does not contain the words "the head of a dog."
Al-Tabarani recorded it in al-Mu'jam al-Awsat.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2416