Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says: The Prophet (peace and blessings be upon him) was setting out to take part in a military expedition, and he (peace and blessings be upon him) said: "Today let no one accompany us who has harmed his neighbour." A man among those present said: I urinated at the foot of my neighbour's wall. The Prophet (peace and blessings be upon him) said: "Do not accompany us today."
Al-Tabarani recorded it in al-Mu'jam al-Awsat; its chain contains a narrator, Yahya bin Abd al-Hamid al-Himmani, and he is da'if (weak).