> No, no I do not want to set sitegroup to  other one.
> I just want to copy article to another topic.
> "much ado about copy" :)
> 
> this is all code in this page element:
> "$new = mgd_copy_article($article, $new_topic); "
> 
> I try with this before copy:
> 
> $person = mgd_get_person($midgard->user);
> $sitegroupobj = mgd_get_sitegroup(1);
> $person->sitegroup = $sitegroupobj->id;

The last is guaranteed to be '1' of course.

You can use $person->setsitegroup(1) but BE CAREFUL when moving stuff 
across sitegroups. All objects that reference the person record (pages, 
articles for example) will be orphaned unless you move them to the new SG 
too.

> mgd_auth_midgard($person->username+$sitegroupobj->name,$person-
>password,0);

mgd_auth_midgard($person->username . '+' . $sitegroupobj->name,
  $person->password,0);

Is the password in the $person object?

Emile


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to