Jami` at-Tirmidhi, Book 36, Hadith 83 (Tirmidhi 2455)

Anas bin Malik narrated that the Messenger of Allah (s.a.w) said:

" A man shall be with whoever he loves, and for him shall be what he has earned."