The fuqaha’ have stated that it is essential to remove everything that may prevent the water from reaching the parts of the body that must be washed in order for ghusl or wudoo’ to be valid, because washing the parts of the body cannot be achieved otherwise.
Al-Nawawi said: If there is wax, dough, henna and the like on one of his limbs, which prevents water from reaching any part of it, then his tahaarah is not valid, whether the amount is large or small. If there are traces of henna and its colour left on the hand, without there being any solid material left, or elsewhere, or traces of liquid grease whereby water flows over the limb but does not stay there, his tahaarah is valid. End quote.
End quote from al-Mughni (1/529).
With regard to the ruling on the prayers you offered when this glue was still on you, it depends. If the glue was thick and prevented water from reaching the skin, then you should regard the prayer as invalid and you have to repeat them. But if it was a small amount and did not prevent the water from reaching the skin, then the prayer is valid. You can determine that because you can see it, but if you are uncertain, then to be on the safe side you may repeat the prayers.
The scholars differed concerning the ruling on sequence of washing in ghusl. There are two opinions:
1 – That washing the parts in sequence is not essential. This is the view of most of the scholars as was stated in al-Mughni (1/220) where it is the favoured view. Shaykh al-Islam also said that in Sharh al-‘Uddah (1/208) and quoted a great deal of evidence for that, which you will find in the answer to question no. 99543. According to this view, if a person omits to wash a part of his body then remembers it after that, it is sufficient for him to wash only the area that he omitted, and he does not have to repeat ghusl.