Share » Forums » Install & configuration » How to fetch user by user ID?

How to fetch user by user ID?

How to fetch user by user ID?

Sunday 02 May 2010 6:42:57 pm - 3 replies

Author Message

Peter Keung

Sunday 02 May 2010 10:12:46 pm

User IDs in eZ Publish are their content object IDs, so you could use the content / object fetch and then output the attributes like any normal content object.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Abdelkader RHOUATI

Monday 03 May 2010 2:42:43 am

Hello Jorge,

For your need, there are simpler; in each node geted by a fetch, you will find an "owner" attribute, it is the object that corresponds to the user who created this node.

So to display the image and name of the creator of a node, you do:

{attribute_view_gui attribute=$node.object.owner.data_map.image image_class=medium}
 By: M. {$node.object.owner.name|wash()}

Regrads

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Jorge estévez

Monday 03 May 2010 4:43:08 am

Thanks

I will give it a try!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

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

36 542 Users on board!

Forums menu