You can try the following things:
Replace
Code:
%items = (
Nickname => $ENV{REMOTE_USER} || $config->{default_nick},
By
Code:
%items = (
Nickname => $bbuserinfo[username],
OR
Replace
Code:
# default nickname, a ? is replaced with a random number
default_nick = user???
by
Code:
# default nickname, a ? is replaced with a random number
default_nick = $bbuserinfo[username]
One of the two should work.
In both cases you would need to add this near the top of the document (where the vars are set)
PHP Code:
require_once('./global.php');
Or, when your code is in HTML or ASP (which I highly doubt)
PHP Code:
<?php require_once('./global.php'); ?>