Content profiles in Drupal 6, by default are plain old nodes, so if they are published everyone will have access to them.
This sets up a realm and restricts it to the profile owner.
Pulled from https://drupal.org/node/837220#comment-3147640 – but this is the gist of it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
/** * Implement hook_node_access_records(). */ function custom_node_access_records($node) { if ($node->type == 'profile') { // Authors need access to their own private profile $grants[] = array( 'realm' => 'custom_profile', 'gid' => $node->uid, 'grant_view' => TRUE, 'grant_update' => TRUE, 'grant_delete' => FALSE, ); return $grants; } } /** * Implement hook_node_grants(). */ function custom_node_grants($account, $op) { $grants['custom_profile'] = array($account->uid); return $grants; } |
Then rebuild node access.