diff options
-rw-r--r-- | admin/user_list.php | 2 | ||||
-rw-r--r-- | include/functions_user.inc.php | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/admin/user_list.php b/admin/user_list.php index 735be89b7..79cf5af98 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -823,7 +823,7 @@ foreach ($page['filtered_users'] as $num => $local_user) 'U_PERM' => $perm_url.$local_user['id'], 'USERNAME' => $local_user['username'], 'STATUS' => $lang['user_status_'.$local_user['status']].(($local_user['adviser'] == 'true') ? ' ['.$lang['adviser'].']' : ''), - 'EMAIL' => isset($local_user['email']) ? get_email_address_as_display_text($local_user['email']) : '', + 'EMAIL' => get_email_address_as_display_text($local_user['email']), 'GROUPS' => $groups_string, 'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled'] ) diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index a801fbc19..c3048d6b0 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -656,13 +656,20 @@ function get_email_address_as_display_text($email_address) { global $conf; - if (is_adviser()) + if (!isset($email_address) or (trim($email_address) == '')) { - return 'adviser.mode@'.$_SERVER['SERVER_NAME']; + return ''; } else { - return $email_address; + if (is_adviser()) + { + return 'adviser.mode@'.$_SERVER['SERVER_NAME']; + } + else + { + return $email_address; + } } } |