Forums / Developer / Removing object from just one location (not main)

Removing object from just one location (not main)

Author Message

Matej Ukmar

Thursday 06 May 2004 7:41:05 am

Hi, I am haveing my users in two groups, "Guests" and "Users" and Guests is the
main location.
When a user expire it becomes memeber just of the main group "Guests"

I am haveing problems completely removing assgnment from "Users" gorup.

my current remove code is:

eZContentObject::remove($contentObject->attribute('id'), $regUser->attribute('node_id'));		

When exploring in admin... user is "successfully" not! listed in "Users" group.
But when I open user object for editing, there are still two locations for
this object. Does anybody know how to remove also this location assignment?

Help much appreciated.

Thanks,
Matej

Matej Ukmar

Monday 10 May 2004 9:43:59 am

In the meanwhile I founded solution 2 my problem.
It is not so nice solution as I expected but it works:)

eZContentObjectTreeNode::remove( $regUser->attribute('node_id') );
$db->query( "DELETE FROM eznode_assignment WHERE contentobject_id = '$delID' AND parent_node = $registeredUserPlacement" );