Forums / Developer / display current_user main_node_id in php
ludo thomas
Friday 06 January 2006 3:06:34 am
Hi ! I need to access to the main_node_id in checkout.phpI use:
$user=& eZUser::currentUser(); $userId=$user->attribute('contentobject_id');
So I have the user ID but how to have the user's main node?
thx
Kristof Coomans
Friday 06 January 2006 5:29:57 am
$user =& eZUser::currentUser(); $userContentObject =& $user->attribute( 'contentobject' ); $mainNodeID = $userContentObject->attribute( 'main_node_id' ); $mainNode =& $userContentObject->attribute( 'main_node' );
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
Friday 06 January 2006 6:04:54 am
hi kristoff, & thx for your reply,I tried this before but your code doesn't dislay nothing... any idee?does it display something with you?
Saturday 07 January 2006 9:12:58 am
What do you get with:
var_dump( $mainNode ); var_dump( $mainNodeID );
after the code I gave you already?