示例#1
0
/**
 * Prints a list of users
 *
 * @param array $userlist an array of user objects
 * @param $return if true return html string
 */
function tag_print_user_list($userlist, $return = false)
{
    $output = '<ul class="inline-list">';
    foreach ($userlist as $user) {
        $output .= '<li>' . tag_print_user_box($user, true) . "</li>\n";
    }
    $output .= "</ul>\n";
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
示例#2
0
/**
 * Prints a list of users
 *
 * @deprecated since 3.1
 * @param  array       $userlist an array of user objects
 * @param  bool        $return if true return html string, otherwise output the result
 * @return string|null a HTML string or null if this function does the output
 */
function tag_print_user_list($userlist, $return = false)
{
    debugging('Function tag_print_user_list() is deprecated without replacement. ' . 'See core_user_renderer for similar code.', DEBUG_DEVELOPER);
    $output = '<div><ul class="inline-list">';
    foreach ($userlist as $user) {
        $output .= '<li>' . tag_print_user_box($user, true) . "</li>\n";
    }
    $output .= "</ul></div>\n";
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}