Re: [Resolved] Buddypress – Restrict xprofile field to read-only
Finally sorted something out.
==========================================================================
Add the following to your edit.php file:
`
<?php if(bp_get_current_profile_group_id()==2)
> //change this to the group id you want to restrict
These field have been locked by the Administrator. //or whatever you want to say
`
==========================================================================
Fix this line to include the “<?php" before the if like so:
`<?php if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :`
==========================================================================
insert this to the second last line:
“
==========================================================================