Skip to content

Instantly share code, notes, and snippets.

@joet3ch
Created September 17, 2010 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joet3ch/583653 to your computer and use it in GitHub Desktop.
Save joet3ch/583653 to your computer and use it in GitHub Desktop.
$user = new User();
if (isset($_SERVER['Authorization'])) {
$authorization = $_SERVER['Authorization'];
} elseif (function_exists('apache_request_headers')) {
$headers = apache_request_headers();
if (isset($headers['Authorization'])) {
$authorization = $headers['Authorization'];
}
}
echo $_SERVER['PHP_AUTH_USER'];
echo $authorization;
echo $session_id;
$username = $_SERVER['PHP_AUTH_USER'];
$user->recordLogin('11', session_id);
$user->recordUserLogon($username, 1);
// perform logout
if ( isset($_REQUEST['logout']) ) {
$logout = $userObj->logout($session_id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment