I want to manage my authentication using a single singon system, unfortunately from Apache this means AuthType cannot be Basic.
PHP unfortunately only sets $_SERVER[PHP_AUTH_USER] if AuthType = Basic, which is often not the case for custom auth types. This is unfortunately a stupid assumption by PHP developers that only type Basic would have usernames!
The simple work around for this is to check for $_SERVER[PHP_AUTH_USER] and for $_SERVER[REMOTE_USER] in the auth module:
Currently auth_login.php:
Code: Select all
if (isset($_SERVER["PHP_AUTH_USER"])) {
$username = str_replace("\\", "\\\\", $_SERVER["PHP_AUTH_USER"]);
}