settings: Hide email address if not available in user-edit form.

This commit is contained in:
Sahil Batra
2022-03-01 13:30:14 +05:30
committed by Tim Abbott
parent bf562f8fff
commit aab82d1f16
2 changed files with 3 additions and 9 deletions

View File

@@ -542,15 +542,7 @@ export function show_edit_user_info_modal(user_id, from_user_info_popover, $stat
return;
}
let user_email = settings_data.email_for_user_settings(person);
if (!user_email) {
// When email_address_visibility is "Nobody", we still
// want to show the fake email address in the edit form.
//
// We may in the future want to just hide the form field
// for this situation, once we display user IDs.
user_email = person.email;
}
const user_email = settings_data.email_for_user_settings(person);
const html_body = render_admin_human_form({
user_id,