Commit 7b1ab3fc authored by danepowell's avatar danepowell Committed by mikeytown2

Issue #2347835 by Dane Powell: shield module integration of http auth.

parent 998ed3be
......@@ -305,7 +305,10 @@ function _httprl_build_drupal_root($level = 0, $hostname_mode = 0) {
// Server auth.
$auth = '';
if (isset($_SERVER['AUTH_TYPE']) && $_SERVER['AUTH_TYPE'] == 'Basic') {
if (module_exists('shield')) {
$auth = variable_get('shield_user', '') . ':' . variable_get('shield_pass', '') . '@';
}
elseif (isset($_SERVER['AUTH_TYPE']) && $_SERVER['AUTH_TYPE'] == 'Basic') {
$auth = $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] . '@';
}
// Use static for gethostbyname lookup.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment