imho, the problem is not the tag of the userid.
the problem lies inside the var that holds your
thread id - its blank, cause u get query that says:
and this is what cause your error.
so in order to solve it i would advise you to check the file bbcode.php under the "modify" section for the any var spelling errors might be there (in case you modded it). Or, also quite possible - try to check your nav template (in case you tried to mess with templates), for any possible mising t=#### or something that can cause your code to get empty var value (or even try to revert your templates changes, if u made any).