Ok I figured out a way to make this work but it seems like it needs some work. I have a feeling the general direction is right.
Add the following to the bottom of lib-common.php:
Text Formatted Code
$subject = $_CONF['site_url'] . '/users.php';
$pattern = '/(http://[^/]*)(/.*)/';
preg_match($pattern, $subject, $matches);
if ((!isset($_USER['uid'])) && ($HTTP_SERVER_VARS['REQUEST_URI'] != $matches[2])) {
header('Location: ' . $_CONF['site_url'] . '/users.php');
}
This essentially restricts access to any php that includes lib-common (all of the docs in GL? ) except users.php. Any comments or suggestions?