// Check if there are previously added, but uncommitted rows.
if(empty($form_state['uncommitted'])){
$form_state['uncommitted']=array();
}
// Check if node exists.
if(node_load($nid)){
$form_state['uncommitted'][]=$nid;
}
else{
// Invalid node number.
// @todo: Error msg. But how?
}
// Find the correct node titles.
// @todo: It seems silly to re-query the titles every time. is there another way...?
if(!empty($form_state['uncommitted'])){
$result=db_query('SELECT nid,title, 0 AS grant_view, 0 AS grant_update, 0 AS grant_delete FROM {node} WHERE nid IN (:nids)',array(':nids'=>$form_state['uncommitted']));
...
...
@@ -141,7 +154,7 @@ function flexiaccess_user($form, &$form_state, $user) {