Thursday 14 January 2010 12:53:41 am
Hi there, I have a problem fetching users and filtering them by "logged in" status :
$membres = eZContentObjectTreeNode::subTreeByNodeID(false, 253);
foreach($membres as $membre){
$usr = eZUser::instance($membre->ContentObjectID);
$nod = eZContentObject::fetch($membre->ContentObjectID);
if($usr->isLoggedIn() == true)
$liste[] = array("nom" => $nod->Name, "id" => $nod->ID);
} But when I look to my $liste, everybody is in, although everybody is not logged in. (verified in the administration panel) For information, I really need this code because I need to filter the users by another added attribute too. And as the web site will have a lot of users. I prefer to do this kind of operations directly in PHP and not with the template language (for speed). Thanks, Damien
|