Prevent users from editing or viewing their own profile What is the best way to disable access to the user's profile for viewing and editing? Basically users can create an account but won't be able to edit or view their own or other users' profiles.
Add this to a custom module:

function MYMODULE_menu_alter(&amp;$items) {
  $items['user/%user']['access arguments'] = array('access user profiles');
  $items['user/%user']['access callback'] = 'user_access';
  $items['user/%user/edit']['access arguments'] = array('administer users');
  $items['user/%user/edit']['access callback'] = 'user_access';
}


This will put the user profile view under 'View user profiles' permission and edit under 'Administer users'.