when you save the node the restrictions don’t get saved along with it – Restricted content module in drupal
Posts and pages
Ran into a problem on node form add: there is no nid assigned, so when you save the node the restrictions don’t get saved along with it. The node doesn’t exist, so at that point in the form it has no nid — a value of nid=0 was being added to {restricted content}.
What the user would see is the access restriction just not being saved. They’d have to go back in and edit the saved node, and then set the access again before it would “take.”
Here is the solution :
function restricted_content_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
if ($op == ‘delete’) {
db_query(“DELETE FROM {restricted_content} WHERE nid = %d”, $node->nid);
}
+ elseif ($op == ‘insert’) {
+ $rids = array_keys(array_filter($node->restricted_content['rids']));
+ if ($rids) {
+ db_query(“INSERT INTO {restricted_content} VALUES (%d,’%s’)”, $node->nid, serialize($rids));
+ }
+ }
elseif ($op == ‘alter’ && !restricted_content_form_access($node->uid) && !restricted_content_node_access($node->nid)) {
$message = restricted_content_var(‘message’);
$node->restricted = TRUE;
Add another else if “insert” option
it’s work for me, best of luck to you…..

Leave your response!