If the hadeeth about pulling someone back from the first row so that one would not pray alone in the second row were authentic, it would be obligatory to base the opinion on it. However, its chain of narration is not authentic, as I have explained in Irwaa-ul-Ghaleel and As-Silsilah Ad- Da'eefah (second volume). Therefore so long as this hadeeth is not authentic, then the person who enters the masjid and the row of prayer in front of him is complete, he must try to squeeze into the row that is before him. This is possible in most cases, during this era in which a majority of Muslims have abandoned the act of joining tightly (by squeezing together) in the lines of prayer, for many of them do not stand close together in the lines of prayer. So if he finds that the row is complete, he should try his best to find an empty space in it, even if he has to gesture to the one he wants to pray next to, to make some space for him to enter.
But if he is not able to do this, either because the people in the row are closely packed together or because some of the people praying do not make room for him, then he could stand in the second row by himself, and his prayer will be valid. This is because the Prophet's saying, "There is no prayer for the one who prays in the row by himself" is only in reference to the extent of one’s ability and adequacy to perform all the rest of the acts of worship. We know, for example, that standing for the obligatory prayer is a pillar (of the prayer). Therefore, if one prays sitting while he has the ability to stand, his prayer is not valid. However, if he is not able to stand, then he could pray sitting, as the Prophet, sallAllaahu 'alayhi wa sallam, said: "Pray standing. But if you are not able to, then sitting. But if you are not able to, then on your bed." This goes the same for the case of the individual who prays behind the row by himself, in that his condition is that he is not able to join into the row that is before him. So the hadeeth, "There is no prayer for the one who prays alone behind the row", is most likely applicable to the person that takes this issue lightly or to the one who turns away from this legal ruling. As has been done by many people, especially those mu'addhins who do not join into the rows, but rather pray by themselves in places near to the door (of the masjid). So these individuals are the ones whom the hadeeth is directed to. As for the man who enters the masjid and tries to join into the row but is not able to, nor does anyone come that will join him (in the second row), then he can pray by himself. And Allaah does not burden a soul with a responsibility, except that He has given it the ability to fulfill the responsibility. And this is the view of Shaikh-ul-Islaam Ibn Taimiyyah.