Whoever welcomes someone known to be a prophet will receive a prophet's reward, and whoever welcomes someone known to be righteous will receive a righteous person's reward.
NIV
He who receives and welcomes and accepts a prophet because he is a prophet shall receive a prophet's reward, and he who receives and welcomes and accepts a righteous man because he is a righteous man shall receive a righteous man's reward.
AMP
He that receiveth a prophet in the name of a prophet shall receive a prophet's reward; and he that receiveth a righteous man in the name of a righteous man shall receive a righteous man's reward.
KJV