Closed (fixed)
Project:
Coherent Access
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2009 at 14:47 UTC
Updated:
18 Aug 2010 at 21:51 UTC
Hallo,
For my project, I have the following setup:
- a content type party (and coherent access as enabled, default is not private)
- a cck userreference party host.
I build a batch import form with some values that automatically create the title. In my submit function a use emtpy $node object to store all the needed values like $node->title, etc. and then save it with node_save($node);
WORKS
But how do I set the coherent_access viewers? I tried:
$node->coherent_access['private'] = 1;
$node->coherent_access['viewers'][23] = "userx";
But the values are not saved after node_save.
Any hints?
Comments
Comment #1
Ghostthinker commentedComment #2
jgraham commentedIt should work if you set the following to a serialized array of usernames keyed by uid.
So to use your example:
Comment #3
janusman commentedMarking this as fixed.