I found the following as Daniel Tyler, "The Gospel Principles", The Juvenile Instructor 13/04 (15 February 1878): 45.
In our last we casually referred to Peter's preaching the doctrine of repentance and baptism for the remission of sins. He not only told them that if they would be baptized their sins should be forgiven, but promised them the gift of the Holy Ghost.
Our devout Christian friends tell us that this was only promised to the Apostles, or, at most, to believers in that age of the world. Now when they say that, they contradict Peter, for he said, "the promise is unto you, and to your children, and to all that are afar off, even as many as the Lord our God shall call." They had just passed the meridian of time, hence, the "last days" had commenced; and he told them that what they had witnessed was what the prophet Joel predicted should come to pass in the last days – that God would pour out His "spirit upon all flesh." He did not tell them that was the end of Joel's prophecy, but a mere beginning, to be continued to them and their children, and to those afar off, and finally to all whom the Lord should call. Call to what? Why, to the same that they were called to. To believe in the Lord Jesus Christ; repent and be baptized for the remission of their sins, by those having the same authority; and they should have the same Holy Ghost, or Spirit of God, which Joel said should, during the period which should follow the meridian of time, called the last days, be poured out upon all flesh. Or, as Isaiah expresses it, "until the knowledge of God shall cover the earth as the waters cover the great deep."
You will see, by reading the second chapter of Acts, that it was the different denominations of religious people of that day, who assembled on the day of Pentecost, whom Peter commanded to repent and be baptized, and promised the gift of the Holy Ghost. Yes, they were "devout men out of every nation under heaven," yet they had to come in by the same door as the publicans and other sinners, or they could not get this Holy Ghost. Just the same as ministers at the present time and their flocks must come in by the same door, or they cannot get this heavenly gift; neither can they otherwise enter the kingdom of God, set up for the last time.
This gift comes by the laying on of hands. Hence, when Paul found some who supposed they had been baptized unto John's baptism, but had never heard the doctrine that John taught about the Holy Ghost, he re-baptized and laid hands on them and they received that heavenly comforter, and spoke with tongues and prophesied. By reading the 8th chapter of the Acts of the Apostles, you will find that Philip went to Samaria and baptized all the Samaritans. When the brethren at Jerusalem heard of it, Peter and John were sent down, who, when they came, prayed that they might receive the Holy Ghost, which none of them had received, although the ordinance of baptism had been attended to. Whether this Philip was the Apostle by that name, and, through so many applications for baptism, had not had time to confirm them, or whether he was a priest after the order of Aaron, and therefore unauthorized to administer in spiritual things, does not appear from the reading. I believe the latter, however, is the more generally received opinion. After prayer, Peter and John confirmed, or laid hands on, them, and they received the Holy Ghost.
There is an instance mentioned in the 10th chapter of the Acts where one devout man – a religious Gentile – received the Holy Ghost before being baptized. This chapter, however, explains itself. It shows the reason to be that, although Jesus had told the Apostles to preach the gospel to every creature, they had, nevertheless, supposed the Gentiles to be unworthy of it. Hence the Lord gave Peter a vision, wherein he was told to kill and eat animals which were called unclean, and forbidden by the law of Moses, which he (Peter) objected to, on the ground that he had never done the like, and did not think it right. This vision, which was repeated three times, was to show him that all the nations of the earth were entitled to salvation if they performed the works required. Still, he could not fully understand it until he saw the Holy Ghost given to that Gentile, even as to himself and others on the day of Pentecost. Then, and not until then, did he say, "Of a truth I perceive that God is no respecter of persons: but in every nation he that feareth him, and worketh righteousness, is accepted of him." The Jews thought the command only meant all nations who were of the seed of Abraham, but Jesus meant just what he said – "all nations."
No sooner was the great Apostle convinced that the Gentiles were entitled to salvation, that he commanded Cornelius and his household to be baptized, although they had received the Holy Ghost.
I trust you will read the whole of the 10th chapter of the Acts of the Apostles. It makes the subject very plain, and shows how Peter, on his return, had to argue and explain before his Jewish brethren would be satisfied with his baptizing, and associating with, the Gentiles. After explaining everything to them, he closed with these emphatic words: "What was I, that I could withstand God?"
An appeal to the great Jehovah settled the question, and the Christian Jews gave it up. All were now satisfied that it was right to baptize believing Gentiles, and this is why they received the Holy Ghost before baptism – that the Jews might know that it was right to baptize them into the Church.