He was a companion of the Prophet. He said, "When the Messenger of Allah ﷺ dispatched an army or expedition, he would say to them, 'If you see a mosque or hear a caller to prayer, do not kill anyone.'"This hadith is hasan gharib, and it is the hadith of Ibn Uyayna.
حدثنا محمد بن يحيى العدني المكي ويكنى بأبي عبد الله الرجل الصالح هو ابن أبي عمر حدثنا سفيان بن عيينة عن عبد الملك بن نوفل بن مساحق
وكانت له صحبة قال كان رسول الله ﷺ إذا بعث جيشا أو سرية يقول لهم إذا رأيتم مسجدا أو سمعتم مؤذنا فلا تقتلوا أحدا هذا حديث حسن غريب وهو حديث ابن عيينة
[Its chain of transmission is daif] Abu Dawud also recorded it in the Book of Jihad, chapter on supplication for the polytheists, hadith no. 2635, through Sufyan bin Uyayna with the same wording, and Haythami graded it hasan in al-Majma, 6/210. The hadith has corroborating narrations in Nasai's al-Kubra, in Tabarani, and in Bayhaqi's al-Dalail, 5/115–118.Ibn Isam, his condition is unknown.