
According to Islamic scholars, if someone becomes in a state of janabah (major impurity) on Friday morning and takes a bath before Friday prayer without making the niyyah for fardh ghusl, then that bath will not be counted as the required fardh ghusl. The person must make the intention for the fardh ghusl for it to be valid.
As Imam Nawawi (رحمه الله) explains, if the intention is missing before starting the obligatory act, the act is not valid. Therefore, bathing without niyyah of fardh ghusl is not enough for removing the state of impurity.