diff -u3bBNr fudforum.org/adm/admglobal.php fudforum/adm/admglobal.php --- fudforum.org/adm/admglobal.php 2004-11-14 13:57:35.000000000 -0800 +++ fudforum/adm/admglobal.php 2004-11-14 11:56:36.000000000 -0800 @@ -241,6 +241,8 @@ print_bit_field('New Account Moderation', 'MODERATE_USER_REGS'); print_bit_field('New Account Notification', 'NEW_ACCOUNT_NOTIFY'); print_bit_field('Public Host Resolving', 'PUBLIC_RESOLVE_HOST'); +# CRG: Default is to allow anonymous users. If TRUE then anonymous users are not allowed and the login screen will be displayed instead + print_bit_field('Deny Anonymous Users', 'DENY_ANONYMOUS_USERS'); print_bit_field('Logged In Users List Enabled', 'LOGEDIN_LIST'); print_reg_field('Logged In Users List Timeout (minutes)', 'LOGEDIN_TIMEOUT', 1); diff -u3bBNr fudforum.org/data/include/GLOBALS_HELP fudforum/data/include/GLOBALS_HELP --- fudforum.org/data/include/GLOBALS_HELP 2004-11-14 13:57:55.000000000 -0800 +++ fudforum/data/include/GLOBALS_HELP 2004-11-14 13:13:33.000000000 -0800 @@ -317,6 +317,9 @@ {{{MODERATED_POST_NOTIFY FUD_OPT_2 262144 Notify forum moderators via e-mail when a new message is posted in a forum where a message must first be approved by the moderator before shown to the rest of the visitors.}}} +{{{DENY_ANONYMOUS_USERS FUD_OPT_4 1 +If YES then anonymous users cannot access the board and the normal login screen is displayed upon initial contact of the forum.}}} + {{{BUST_A_PUNK FUD_OPT_2 524288 When a user is banned set a special cookie that will try to make sure that this user remains banned.}}} diff -u3bBNr fudforum.org/data/src/users.inc.t fudforum/data/src/users.inc.t --- fudforum.org/data/src/users.inc.t 2004-11-14 13:58:22.000000000 -0800 +++ fudforum/data/src/users.inc.t 2004-11-14 13:23:46.000000000 -0800 @@ -643,6 +643,15 @@ define('__fud_real_user__', ($u->id != 1 ? $u->id : 0)); define('_uid', __fud_real_user__ && ($uo & 131072) && !($uo & 2097152) ? $u->id : 0); +/* CRG */ +/* If anonymous user access is denied AND not a real-user (anonymous) and NOT a login then generate a login form */ +/* NOTE that anonymous check is a negative to make it backword compatible with existing GLOBALS.php files */ +if( ($GLOBALS['FUD_OPT_4'] & 1) && !__fud_real_user__ && $_GET['t'] != 'login') { + /* Fake a login for the CGI 't' variable and call ourselvs again exiting with the return code */ + $_GET['t'] = 'login'; + return init_user(); +} + $GLOBALS['sq'] = $sq; /* define constants used to track URL sessions & referrals */