Container users??

Container users??

Sunday 17 June 2007 7:09:56 am - 5 replies

Author Message

André R.

Sunday 17 June 2007 1:26:18 pm

what is $usuario.contentobject.main_node_id if you output it ?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

luis muñoz

Monday 18 June 2007 12:15:15 am

Hi,

$usuario.contentobject.main_node_id is the actual user node_id. I fetched user in the line before :

{def $usuario=fetch('user','current_user')}

Because $usuario.node_id is not definided and the only thing i found with the same value was $usuario.contentobject.main_node_id.

Thanks

Luis

luis muñoz

Monday 18 June 2007 9:22:18 am

Hi,

I'm stuck about this. Any idea about how to fetch content under the user? is this a bug? a feature?

Any help would be appreciated

Luis Muñoz

Joe Kepley

Monday 18 June 2007 8:03:01 pm

Your $usario variable contains a User object, which is a different from the user's content object.

$usario.contentobject.main_node_id is the correct variable to call for the main_node_id.

If this fetch isn't returning anything, there are a couple of things to check:

* Check the anonymous role (or whatever role you're using) to ensure that you can read the content objects

* Check the role assignment to ensure that it's not limited to say, media and content.

Łukasz Serwatka

Monday 18 June 2007 11:55:01 pm

It is also good idea to enable debug output with SQL output, you can see what is wrong there.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

You must be logged in to post messages in this topic!

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