How to extract active users from template

How to extract active users from template

Wednesday 18 April 2007 1:14:28 am - 2 replies

Author Message

Egil Fujikawa Nes

Wednesday 18 April 2007 10:02:00 am

Hi Christian,

I needed a function like that for some time ago, what I ended up with were a loop trough the whole usergroup where my users are located (node 162). This is a bad way to write template code, but at that time I couldn't find any other possibilities.

My code looks like this:

{def $allusers=fetch( 'content', 'list', hash( 'parent_node_id', 162, 'depth', 1 ) )}
{section var=user loop=$allusers}		
     {if $user.object.data_map.user_account.content.is_enabled}			
         User enabled					
    {else}			
        User not enabled			
    {/if}			
{/section}

Hope this will help you :)

BuildCMS - Av. Paulista 777, 15° Andar - CEP: 01311-100 - São Paulo
URL: http://www.buildcms.com

christian bencivenni

Friday 20 April 2007 10:19:21 pm

It works perfectly.
Thank you a lot.

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.