diff options
-rw-r--r-- | include/functions_url.inc.php | 10 | ||||
-rw-r--r-- | include/functions_user.inc.php | 4 | ||||
-rw-r--r-- | profile.php | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 00511e151..44b592036 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -60,7 +60,15 @@ function get_absolute_root_url($with_scheme=true) $url = ''; if ($with_scheme) { - $url .= 'http://'.$_SERVER['HTTP_HOST']; + if (empty($_SERVER['HTTPS'])) + { + $url .= 'http://'; + } + else + { + $url .= 'https://'; + } + $url .= $_SERVER['HTTP_HOST']; if ($_SERVER['SERVER_PORT'] != 80) { $url_port = ':'.$_SERVER['SERVER_PORT']; diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 53d6da3c1..e78ffb01a 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -866,7 +866,7 @@ function create_user_infos($arg_id, $override_values = null) else { $user_ids = array(); - if (is_integer($arg_id)) + if (is_numeric($arg_id)) { $user_ids[] = $arg_id; } @@ -1227,7 +1227,7 @@ function get_email_address_as_display_text($email_address) } else { - if (is_adviser()) + if (script_basename() == 'admin' and is_adviser()) { return 'adviser.mode@'.$_SERVER['SERVER_NAME']; } diff --git a/profile.php b/profile.php index ff19bb3a0..448fc2c5e 100644 --- a/profile.php +++ b/profile.php @@ -228,7 +228,7 @@ function load_profile_in_template($url_action, $url_redirect, $userdata) array( 'USERNAME'=>$userdata['username'], 'USERID'=>$userdata['id'], - 'EMAIL'=>@$userdata['email'], + 'EMAIL'=>get_email_address_as_display_text(@$userdata['email']), 'NB_IMAGE_LINE'=>$userdata['nb_image_line'], 'NB_ROW_PAGE'=>$userdata['nb_line_page'], 'RECENT_PERIOD'=>$userdata['recent_period'], |