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.
This is nothing but fraudulence and sorcery for Allaah The Almighty Says about the dead (what means): {And they will not be able [to give] any instruction, nor to their people can they return.} [Quran 36:50]
It is true that this may happen to some of the righteous as a supernatural event or in a vision during sleep, however, the righteous would never boast about this. Moreover, the rulings of the Sharee‘ah can never be built on visions or supernatural events. Nonetheless, there is no objection to considering them a secondary indication of glad tidings or warnings.
Allaah Knows best.