Create branch with logged in user (Error in my pre-receive hook)

I’m using self-managed my gitlab is in version 12.6.3 (13cad23a0e4)

I am building a hook that checks the commit email. The email must be the same as the logged in user, it works like this:

while read oldrev newrev refname
	ce=$(git show -s --format='format:%ce' $newrev)
	if [[ "$ce" != "${GL_USERNAME}" ]] ; then
		echo "GL-HOOK-ERR: Erro!"
        echo "GL-HOOK-ERR: Email Author: $ce"
        echo "GL-HOOK-ERR: E-mail user: ${GL_USERNAME}"
        exit 1

This is working, but I am encountering a problem when I create a new branch through gitlab, always creating the new branch with the root user. How do I get gitlab to create the branch with the logged in user?