Fix/2.3.x/ecms 3942

Check length of user variable to check it is anonymous or not