Sunan an-Nasa'i, Volume 1, Book 10, Hadith 829 (DarusSalam)

It was narrated that Abu Hurairah said: "Muhammad said: 'Does the one who raises his head before the Imam not fear that Allah may turn his head into the head of a donkey?"'

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا حَمَّادٌ، عَنْ مُحَمَّدِ بْنِ زِيَادٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ مُحَمَّدٌ صلى الله عليه وسلم ‏ "‏ أَلاَ يَخْشَى الَّذِي يَرْفَعُ رَأْسَهُ قَبْلَ الإِمَامِ أَنْ يُحَوِّلَ اللَّهُ رَأْسَهُ رَأْسَ حِمَارٍ ‏" ‏ ‏.‏

sunnah.com