How can I disable account settings? I am using Drupal 6 with the OpenAtrium distribution, and I'd like to completely remove the account settings menu. In other words, I don't want users (or, even better, certain users) from access account settings. I know that it can be done by hiding the menu via CSS, but I am looking for some kind of module that can make it easier.

EDIT:

Ok what I did was creating and activating a new module called disablepermissions:

function disablepermissions_menu_alter(&amp;$items){
     $items['user']['access callback'] = FALSE;
     $items['user/%user/edit']['access callback'] = FALSE;
     $items['user/%user']['access callback'] = FALSE;
}


This actually works as intended but if I try to set some kind of permissions I only get a blank page with a 500 Internal Server Error, why? The following code does not work...

function disablepermissions_perm() {
    return array('visualizza utenti');
}

function disablepermissions_menu_alter(&amp;$items){
     if (access_user('visualizza utenti') {
     $items['user']['access callback'] = TRUE;
     $items['user/%user/edit']['access callback'] = TRUE;
     $items['user/%user']['access callback'] = TRUE;
     }
     else {
     $items['user']['access callback'] = FALSE;
     $items['user/%user/edit']['access callback'] = FALSE;
     $items['user/%user']['access callback'] = FALSE;
     }
}
You could use hook_menu_alter(). Something like this should work:

function yourmodule_menu_alter(&amp;$items){
  $items['user/%user_category/edit']['access callback'] = 'yourmodule_user_custom_access_function';
}

function yourmodule_user_custom_access_function($u){
  return user_access('administer users');
}


This way, only users with "administer users" permissions will be able to edit user informations.