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" );

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:15:39
Script start
Timing: Jan 18 2025 16:15:39
Module start 'layout'
Timing: Jan 18 2025 16:15:39
Module start 'content'
Timing: Jan 18 2025 16:15:41
Module end 'content'
Timing: Jan 18 2025 16:15:41
Script end

Main resources:

Total runtime1.3778 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0469152.6406
Module start 'layout' 0.00580.0047 740.687539.4766
Module start 'content' 0.01061.3657 780.1641429.1016
Module end 'content' 1.37630.0014 1,209.26568.1250
Script end 1.3777  1,217.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2581160.0002
Check MTime0.00140.1031160.0001
Mysql Total
Database connection0.00080.055710.0008
Mysqli_queries1.327096.3135520.0255
Looping result0.00050.0341500.0000
Template Total1.347897.820.6739
Template load0.00270.196520.0014
Template processing1.345097.624420.6725
Template load and register function0.00030.018810.0003
states
state_id_array0.00070.050310.0007
state_identifier_array0.00120.090020.0006
Override
Cache load0.00220.1576200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.039810.0005
Fetch class attribute name0.00110.076920.0005
XML
Image XML parsing0.00020.011010.0002
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00090.0619100.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs