Thursday 07 July 2005 3:12:36 am
I am trying to add a location to a user using template programming but haven't gotten very far. I fetch the user object using
{def $userobject = fetch('content', 'object', hash('object_id', $userID))}
If I do a {$userobject|attribute(show, 3)}
I get a list of the attributes of the user, so I now that it returns a valid user object. The problem arises when I try to do {$userobject->createNodeAssignment($groupNodeID, false)}
to add the user to a new group. I get this error:
parser error @ extension/chsuser/design/standard/templates/chsuser/add.tpl:40[12]
Extra characters found in expression, they will be ignored. >createNodeAssignment($groupID, false)' ($userobject-) Is the function createNodeAssignment not avaliable for user objects? The code works for my custom content objects. Is it possible to do this another way?
Best regards Mikael Johansson, Sweden
Mikael Johansson, Sweden
|