Prevent users from editing or viewing their own profile
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'.