I have a form that allows the user to change name, surname, password etc. So, I have an email field disabled, I don't want to allow the user to change the email in the account settings, so I disabled the input with the disabled html parameter. However, it can be easily bypassed, just go to google console and delete the disabled parameter in the html to change the email input and send the request.
I cannot create a fake email field as the form communicates with a plugin, so the email input must necessarily be present. I thought about disabling it with php as this can't be seen in the html but I'm not sure how to do it and I'm not sure if it's the right method.
How could I disable the form input making it inaccessible to the user and prevent it from being modified with some cheating?
<form name="Form" class="mts-edit-account" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" enctype="multipart/form-data" <?php add_action( 'woocommerce_edit_account_form_tag', 'action_woocommerce_edit_account_form_tag' );?> >
<div class="form-row email_show">
<label class="t3" for="disabled_account_email">Email</label>
<input type="email" class="field-settings disabled" style="pointer-events:none;" name="account_email" id="account_email" disabled value="<?php echo esc_attr( $user->user_email ); ?>" />
<span class="t4-light">Description..........</span>
</div>
</form>