AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] How to disable change of email from wpforo account information edit?

2 Posts
2 Users
0 Reactions
1,011 Views
Posts: 4
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sora9)
Active Member
Joined: 3 years ago
[#56500]

Hi,

My site does not allow change of email for security reasons and account information is managed through UM.

I have seen the past posts about this question, the solution provided is using the following CSS code to hide this section.

.wpf-field.wpf-field-type-email.wpf-field-name-user_email.wpf-field-required {
  display: none;
}

However, hiding section doesn't prevent user from changing email or other values. Any browser can quickly inspect the page and change hidden email value in a few seconds.

Is there any way to totally disable section from the front-end using other methods or through php snippet?

Thanks!


Topic Tags
1 Reply
Sofy
Posts: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi,

You can use JavaScript code provided below: 

jQuery( document ).ready(function() {
    jQuery('.wpf-field.wpf-field-type-email.wpf-field-name-user_email.wpf-field-required').remove();
});

For guidance on adding JavaScript to WordPress pages, you may find this article helpful: https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/


Share: