All pastes #901948 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-13 01:28 UTC
rendered paste body
<?php

$users = get_records('users', 'user_type', 'person', 'ident DESC', *, 0, 10);

if (empty($users)) {

    $run_result = '<p>' . __gettext('No users found') . '</p>';

} else

    $list = '';
    foreach ($users as $user) {
        $list .= templates_draw(array(
                     'context' => 'userlist:user',
                     'userid' => $user->ident,
                     'username' => $user->username,
                     'name' => htmlspecialchars($user->name, ENT_COMPAT, 'utf-8'),
                 ));
    }

    $run_result = templates_draw(array(
                      'context' => 'userlist:list',
                      'sectiontitle' => __gettext('List'),
                      'list' => $list,
                  ));

}