Looks like there is a variable conflict between USER_ID and USER_IDPUB -
so I changed USER_IDPUB to USER_PUBID