Disable edit of user profile

Solved6.84K viewsThemesprofile user
0

Great plugin and super excited for the new profile system. Is there a way currently to edit the plugin files to disable just the *edit* of the profiles?

I’m having trouble seeing where a profile is changed based on if current user id, I simply want to display all profiles as read only. I just need a quick and dirty fix to turn this off for a production site.

1

Simple and dirty way to achieve this :

open includes/class-user.php.

find:

ap_register_user_page('profile', __('Profile', 'ap'), array($this, 'profile_page'));

and comment it.

Appreciate the help, though that removed the user fields entirely and shows an error message.

It did set me on the right path though and in user-fields.php changing the default from the User Id to 0

$defaults = array(
‘user_id’ => 0,
‘form’ => array(),
);

Does the trick, then had to add an additional arg (“hide_submit”) to hide the submit button for all profiles.

Our situation is kind of unique in that our wp_users are maintained external to wordpress itself and we update/sync on login, so we really don’t want users thinking they are editing their *actual* profile (password/email) and getting upset when changes don’t propagate.

Thanks again!