From 8d54e94006bd341b4fd8549ec1f9cfb98ed0ac9d Mon Sep 17 00:00:00 2001 From: Kload Date: Fri, 29 Nov 2013 15:56:17 +0100 Subject: [PATCH] Fix different mail from user --- source/php/functions.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/php/functions.php b/source/php/functions.php index 0c8af39..f06e7c0 100755 --- a/source/php/functions.php +++ b/source/php/functions.php @@ -754,14 +754,21 @@ function httpAuthEnabled() { // The function to authenticate with HTTP function httpAuthentication() { - $host = (isset($_SERVER['HTTP_EMAIL'])) ? substr(strrchr($_SERVER['HTTP_EMAIL'], "@"), 1) : HOST_MAIN; + if (isset($_SERVER['HTTP_EMAIL'])) { + $user = strstr($_SERVER['HTTP_EMAIL'], "@", true); + $host = substr(strrchr($_SERVER['HTTP_EMAIL'], "@"), 1); + } else { + $user = $_SERVER['PHP_AUTH_USER']; + $host = HOST_MAIN; + } echo ''; } + // The function to quickly translate a string function _e($string) { echo T_gettext($string);