It is narrated from Sayyiduna Abdullah (may Allah be pleased with him) that "A Bedouin came and urinated in the mosque, so the Prophet (peace and blessings be upon him) gave an order concerning that spot; it was dug up and a bucket of water was poured over it. (Later) that Bedouin said: O Messenger of Allah (peace and blessings be upon him), a man loves a people although he has not yet done deeds like theirs (what is his ruling)? The Messenger of Allah (peace and blessings be upon him) said: 'A person will be with the one he loves.'"
It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said the same.