diff --git a/library/config.php b/library/config.php index 22f0fa97d..94e330a1e 100644 --- a/library/config.php +++ b/library/config.php @@ -415,6 +415,7 @@ $bb_cfg['topic_notify_enabled'] = true; $bb_cfg['pm_notify_enabled'] = true; $bb_cfg['group_send_email'] = true; $bb_cfg['email_change_disabled'] = false; // TODO: disable changing email by user +$bb_cfg['show_email_visibility_settings'] = true; // разрешать ли пользователям изменять свои настройки отображения почты (Скрыто или нет) $bb_cfg['bounce_email'] = "bounce@$domain_name"; // bounce email address $bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index 83d9ec403..78639b11a 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -322,7 +322,7 @@ foreach ($profile_fields as $field => $can_edit) { $update_user_opt = [ # 'user_opt_name' => ($reg_mode) ? #reg_value : #in_login_change - 'user_viewemail' => $reg_mode ? false : true, + 'user_viewemail' => $reg_mode ? false : (IS_ADMIN || $bb_cfg['show_email_visibility_settings']), 'user_viewonline' => $reg_mode ? false : true, 'user_notify' => $reg_mode ? true : true, 'user_notify_pm' => $reg_mode ? true : true, diff --git a/styles/templates/default/usercp_register.tpl b/styles/templates/default/usercp_register.tpl index 3b5dc0b09..2cf570913 100644 --- a/styles/templates/default/usercp_register.tpl +++ b/styles/templates/default/usercp_register.tpl @@ -210,7 +210,7 @@ - +