Alright so here is my new plugin code:
PHP Code:
ob_start();
print $vbulletin->userinfo['username'];
global $username;
$username = ob_get_contents();
ob_end_clean();
And here is my CGI File
Code:
# PREFs Section 03: Security.
############################################################################
# Password Protection, Option 3 of 5 (use your site's existing login system):
#
# If your site already has a login system, either cookie-based or based on
# PHP sessions, you can make FileChucker integrate with it.
#
# If using the PHP session method, you must set the following environment
# variables from PHP just before calling filechucker.cgi from PHP:
#f
# putenv("PHP_ENC_USERNAME=$username"); # where $username is your PHP user variable.
# putenv("PHP_ENC_ISADMIN=$X"); # where $X is a 0 or a 1.
#
# This option is mutually exclusive with the integrate_with_userbase option.
#
$PREF{integrate_with_existing_login_system} = 'no';
$PREF{login_error_message} = qq`Error: not logged in. Perhaps you need to <a href="/">go home</a> and log in first?`;
#$PREF{logout_url} = '/logout/';
#$PREF{login_url} = '/login/';
#$PREF{forced_logout_link} = qq`<p>Logging out; <a href="%%logout_url%%">click here</a> to continue.</p>\n`;
#
$PREF{enable_username_from_cookie} = 'no';
$PREF{member_username_cookie_name} = $username;
$PREF{admin_username_cookie_name} = 'anderma';
#
$PREF{enable_username_from_php_session} = 'yes';
Do I set $PREF{member_username_cookie_name} to $username?