Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Closed] change password field

3 Posts
3 Users
1 Reactions
3,490 Views
Posts: 1
Topic starter
(@weimar)
New Member
Joined: 7 years ago

Greetings, how can I disabled the password change fields?

2 Replies
Robert
Posts: 10616
Admin
(@robert)
Support Team
Joined: 9 years ago

There is no option to disable password field. But this code may work. Please try it:

function my_custom_account_fields( $fields ){
$remove_fields = array('user_pass');
if( !empty($fields) ){
foreach( $fields as $r => $rows ){
foreach( $rows as $c => $cols ){
foreach( $cols as $f => $field ){
if( wpfval($field, 'name') && in_array($field['name'], $remove_fields) ){
unset($fields[$r][$c][$f]);
}
}
}
}
}
return $fields;
}
add_filter( 'wpforo_get_account_fields', 'my_custom_account_fields');

Put this code in current active WordPress theme functions.php file.

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

VereK
Posts: 522
(@verek)
Honorable Member
Joined: 8 years ago

It might be easier (especially if you want to revert at some point) to "pointer-events: none;" the password fields in Style Settings CSS?