mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
Fix different mail from user
This commit is contained in:
parent
5c7f4a72d4
commit
8d54e94006
1 changed files with 9 additions and 2 deletions
|
@ -754,14 +754,21 @@ function httpAuthEnabled() {
|
||||||
|
|
||||||
// The function to authenticate with HTTP
|
// The function to authenticate with HTTP
|
||||||
function httpAuthentication() {
|
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 '<script type="text/javascript">
|
echo '<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
doHttpLogin("'.$_SERVER['PHP_AUTH_USER'].'", "'.$_SERVER['PHP_AUTH_PW'].'", "'.$host.'", 10);
|
doHttpLogin("'.$user.'", "'.$_SERVER['PHP_AUTH_PW'].'", "'.$host.'", 10);
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// The function to quickly translate a string
|
// The function to quickly translate a string
|
||||||
function _e($string) {
|
function _e($string) {
|
||||||
echo T_gettext($string);
|
echo T_gettext($string);
|
||||||
|
|
Loading…
Reference in a new issue