Today the Imam told us that the Prophet had prohibited praying while inbetween shade and sunlight.
What is the full hadith and where does it come from?
(Authenticity and Chain Of Narration)
I was able to find the below Hadiths:
It was narrated from Ibn Buraidah, from his father, that the Prophet(ﷺ) : "forbade sitting between the shade and sun."
Sunan Ibn Majah 3722
AbulQasim (ﷺ) said: When one of you is in the sun (Shams)--Makhlad's version has "fay'"--and the shadow withdraws from him so that he is partly in sun and partly in shade, he should get up. Sunan Abi Dawud 4821
A fatwa on IslamQA states :
It was reported that a Muslim is not allowed to sit with one half of his body in the shade and the other half in the sun. "The Prophet , forbade sitting between the shade and the sun." [Ibn Maajah, Al-Albaani: Saheeh]
Scholars said the reason for this prohibition is that the person is badly harmed due to the different opposite effects on him. However, it is more worthy to give the reason that was narrated i.e., this is the way the devil sits, for the Prophet , forbade sitting partially in the sun and partially in the shade, and said: "This is how Satan sits." [Ahmad, Al-Albaani: Saheeh]
This is similar to the prohibition of imitating Satan in eating and drinking with the left hand.