Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates that the Prophet (peace and blessings be upon him) said: "Whoever's prayer does not restrain him from indecency and wrongdoing keeps moving farther away from Allah Almighty."
This narration was recorded by Imam al-Tabarani in al-Mu'jam al-Kabir; its chain contains a narrator, Layth bin Abi Sulaym, who is "thiqah" (trustworthy), but he is a mudallis (one who conceals defects in the chain).
Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) says: Whoever's prayer does not command him to do good and does not forbid him from wrongdoing keeps moving farther away from Allah Almighty.
This narration was recorded by Imam al-Tabarani in al-Mu'jam al-Kabir, and its narrators are the narrators of the "Sahih".