he saw it in a dream while he was in prison sentence to four life terms + 30 years. everything he described happened in reality so it's safe to say his dream was real. when you dream of being welcomed by the prophet, it's a done deal.
Muslim