Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "There are three people to whom Allah will not speak, nor will He purify them, and for them is a painful punishment: (1) a person who sells his goods after Asr, swearing an oath that he bought it for so much, and the buyer, believing him, takes the goods from him, although the matter was not so; (2) a person who pledges allegiance to an imam only for the sake of the world: if he gets it, he fulfils it, that is, he stays loyal, and if he does not get any of the world, he does not stay loyal; (3) a servant who withholds surplus water in the wilderness from travellers."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10796