Abu Sa'id al-Khudri reported that the Messenger of Allah (ﷺ) said
When any one of you prays he should not let anyone pass in front of him (if there is no sutra), and should try to turn him away as far as possible, but if he refuses to go, he should turn him away forcibly for he is a devil.
Abu Salih al-Samman reported
I narrate to you what I heard and saw from Abu Sa'id al-Khudri: One day I was with Abu Sa'id and he was saying prayer on Friday turning to a thing which concealed him from the people when a young man from Banu Mu'ait came there and he tried to pass in front of him; he turned him back by striking his chest. He looked about but finding no other way to pass except in front of Abu Sa'id, made a second attempt. He (Abu Sa'id) turned him away by Striking his chest more vigorously than the first stroke. He stood up and had a scuffle with Abu Sa'id. Then the people gathered there He came out and went to Marwan and complained to him what had happened to him. Abu Sa'id too came to Marwan. Marwin said to him: What has happened to you and the son of your brother that he came to complain against you? Abu Sa'id said: I heard from the Messenger of Allah (ﷺ) saying: When any one of you prays facing something which conceals him from people and anyone tries to pass in front of him, he should be turned away, but if he refuses, he should be forcibly restrained from it, for he is a devil.
'Abdullah b. 'Umar reported that the Messenger of Allah (ﷺ) said
When any one of you prays, he should not allow anyone to pass before him, and if he refuses, he should be then forcibly resisted, for there is a devil with him.
This hadith has been narrated by Ibn Umar by another chain of transmitters.
Busr b Sa'id reported that Zaid b Khalid al-Juhani sent him to Abu Juhaim in order to ask him what he had heard from the Messenger of Allah (ﷺ) with regard to the passer in front of the worshipper. Abu Juhaim reported that the Messenger of Allah (ﷺ) said
If anyone who passes in front of a man who is praying knew the responsibility he incurs, he would stand still forty (years) rather than to pass in front of him Abu Nadr said: I do not know whether he said forty days or months or years.
This hadith has been narrated from Abu Juhaim Ansari by another chain of transmitters.