ورد عن الرسول صلى الله عليه وسلم قوله : ( من رآني في منامه؛ فقد رآني حقًا؛ فإنَّ الشيطان لا يتمثل بي )
Whoever sees me, then the vision is true for the devils cannot appear in
my form.
The apparent meaning of the hadith is that the devils are
incapable of taking the true form of the Messenger of Allah (peace be
upon him). But this does not prevent them from taking a form other than
that of the Prophet (peace be upon him) and claiming that they are the
Messenger of Allah (peace be upon him). Therefore it is not permissible
to argue from this hadith that everyone who sees who he thinks is the
Messenger of Allah (peace be upon him) in a dream has actually seen
him, unless, of course, who he saw meets the description of the Prophet
(peace be upon him) that is found in the books of hadith. Many people
claim that they had seen the Prophet, yet they give a description of him
that differs from what has been recorded in the trustworthy books.