config_multi_user_select()

Description

Generate an html multi-select block for selecting from among RS users.

An array consisting of the user keys (i.e., values from the "ref" column of the user table) for the
selected users is the value posted.

Parameters

ColumnTypeDefaultDescription
$name string the name of the select block. Usually the name of the config variable being set.
$label string the user text displayed to label the select block. Usually a $lang string.
$current array
$width integer 420 the width of the input field in pixels. Default: 300.
array integer $current the current value of the config variable being set.

Location

include/plugin_functions.php lines 792 to 828

Definition

 
function config_multi_user_select($name$label$current = array(), $width 420)
{
    global 
$lang;
    
?>
    <div class="Question">
        <label for=" echo escape($name); ?>" title=" echo escape(str_replace('%cvn'$name$lang['plugins-configvar'])); ?>">
             echo escape($label); ?>
        </label>
        <fieldset
            name=" echo escape($name); ?>[]"
            id=" echo escape($name); ?>"
            class="MultiRTypeSelect"
            style="width: echo (int) $width?>px"
        >
            <div class="MultiRtypeSelectContainer">
                
                $users 
get_users();
                foreach (
$users as $user) { ?>
                    <span id="user echo (int) $user['ref'];?>">
                        <input
                            type="checkbox"
                            value=" echo (int) $user['ref']; ?>"
                            name=" echo escape($name); ?>[]"
                            id=" echo escape($name $user['ref']); ?>"
                             echo in_array($user['ref'], $current) ? ' checked="checked"' ''?>
                        >
                             echo escape($user['fullname'] . ' (' $user['email'] . ')'); ?>
                        </input>
                    </span>
                    <br />
                 ?>
            </div>
        </fieldset>
        <div class="clearerleft"></div>
    </div>
    
}

This article was last updated 17th July 2025 21:35 Europe/London time based on the source file dated 4th July 2025 10:35 Europe/London time.