ibexa

Path

ez publish / technical manual / 3.10 / reference / modules / content / fetch functions / object_count_by_user_id


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

object_count_by_user_id

Summary

Fetches the number of objects (of a class) created by a user.

Usage

fetch( 'content', 'object_count_by_user_id',
       hash( 'class_id', class_id,
             'user_id',  user_id ) )

Parameters

NameTypeDescriptionRequired
class_id integer The ID number of the target class. Yes.
user_id integer The ID number of the user (object ID). Yes.

Returns

The number of objects (as an integer).

Description

This function counts the number of objects (of a certain type) that were created by a user. Both the type of the object (the class) and the user must be specified. The function returns an integer revealing the number of objects that were found.

Examples

{def count=fetch( 'content', 'object_count_by_user_id', hash( 'class_id', 13, 'user_id', 14 ) )}
{$count}
{undef $count}

Outputs the number of objects (of class number 13) that have been created by user number 14.

Balazs Halasy (06/02/2004 12:10 pm)

Svitlana Shatokhina (05/06/2006 2:44 pm)

Balazs Halasy, Svitlana Shatokhina


Comments

There are no comments.