Only admin can change profiles in the first place, except for the profile owner.
Are you saying you don’t want the member themselves to be able to change their own profile?
I have thought about this as well. I would like to prevent members from editing their own profile, or at least their email. What happens is people register with a real email address, get their password, then change the email so you don’t know their real email address. I would like to prevent that, and I think cyclune was talking about something similar, prevent a member from editing their own profile.
untested, in theory:
function bb_tweaks_no_profile_edit($retvalue, $capability, $args) {
if ($capability=="edit_user") {return bb_current_user_can( 'administrate');}
return $retvalue;
}
add_filter('bb_current_user_can', 'bb_tweaks_no_profile_edit',10,3);
Chrishajer is right. I have bbpress linked with WordPress. I don’t want the users to change their own profile with wrong email adresses or new user names.
_ck_ – where do I have to insert this piece of code???
cyclune
make it into a mini-plugin, ie.
<?php
/*
Plugin Name: No Profit Edit
*/
function bb_tweaks_no_profile_edit($retvalue, $capability, $args) {
if ($capability=="edit_user") {return bb_current_user_can( 'administrate');}
return $retvalue;
}
add_filter('bb_current_user_can', 'bb_tweaks_no_profile_edit',10,3);
?>
Save it as no-profile-edit.php
put into my-plugins
and activate.
Make sure you don’t put any spaces at the beginning or end of the file.