MDL-23949 fixed use of invalid $USER before linked to session