All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The Prophet, sallallaahu ‘alayhi wa sallam, does not command anything that goes against Islam. This is proof enough that what that person saw was definitely not the Prophet, sallallaahu ‘alayhi wa sallam. We have already answered your previous question that the devil may make a person believe that what he saw was the Prophet, sallallaahu ‘alayhi wa sallam, in a dream whereas the image which he saw was different to the known features of the Prophet, sallallaahu ‘alayhi wa sallam.
The scholars have explicitly stated that dreams containing anything that contravenes the revealed Sharee'ah are rejected and false. Imaam An-Nawawi, in his commentary on Muslim's Saheeh, quoted Al-Qaadhi ‘Iyaadh about using as evidence what a person sees in a dream, saying: "A dream does not invalidate an established Sunnah, and it does not establish a Sunnah that has not been confirmed as authentic; this is according to the consensus of the scholars."
An-Nawawi said: "This is what the scholars of our (Shaafi'i) School and others said: they reported an agreement that what a person sees in a dream does not change what has already been established in the Sharee'ah." [End of quote]
An-Nawawi also said: "If it is the night of the thirtieth of the month of Sha’baan and the people did not see the crescent, and a person sees the Prophet, sallallaahu ‘alayhi wa sallam, in a dream telling him, 'tonight is the first night of Ramadan', it is not valid to fast according to this dream, not for the person who saw the dream, and not for others." [Al-Majmoo']
Moreover, Az-Zarqaani stated in his commentary on the Muwatta’ of Imaam Maalik: "…a man saw the Prophet in a dream telling him: Go to a particular place and dig it and you will find a treasure (that was hidden at the time of the Jaahiliyyah – pre-Islamic era); take it and you do not have to pay off one-fifth of it as Zakah. In the morning he went to that place and dug it and found the treasure. So he sought a Fatwa from the scholars of his time who told him that he did not have to pay one-fifth of it as Zakah as the dream was valid, but the Qaadhi Al-‘Izz ibn ‘Abdus-Salaam issued a fatwa to him that he must pay off one-fifth as Zakah and said: 'The most that can be said about his dream is that it resembles a Hadeeth that was narrated with an authentic chain of narrators, but this Hadeeth is contradicted by what is more authentic than it, which is the Hadeeth which reads: 'On treasures pulled out from the earth, one-fifth is due as Zakah.'" [End of quote]
Allaah Knows best.