Trying to fix the problem where the update fails if the userid has a spa...

...ce at the end.
@srkirkland what do you think? I guess it is possible that this could clear out the userId if I did something wrong.