Arcana Coelestia # 8007
8007. 'And when a sojourner sojourns with you' means those who have received instruction in the Church's truth and good, and have accepted them. This is clear from the meaning of 'a sojourner' as those who received instruction in and accepted the statutes and laws of the Church, dealt with in 2025, 4444, 7908. The words 'when he sojourns with you' are used because 'sojourning' means receiving instruction and living, 1463, 3672, so that' sojourners sojourning with them' means not only those who received instruction in the Church's truth and good and accepted them, but also those who led lives in keeping with them.
Exodus 12:48-49
48
And when a stranger shall sojourn with thee, and will keep the passover to the LORD, let all his males be circumcised, and then let him come near and keep it; and he shall be as one that is born in the land: for no uncircumcised person shall eat thereof.
49
One law shall be to him that is homeborn, and unto the stranger that sojourneth among you.