Solution 3: Appropriate for TWiki 4 (Dakar)
When the User information is stored in a UserForm? (as is default in Dakar) then this list can be generated as follows:
<form name="testing" action="%SCRIPTURLPATH{"view"}%/%MAINWEB%" method="get">
<select name="topic">
<option>Select user...</option>
%SEARCH{"%META:FORM.*[U]serForm" web="%MAINWEB%" regex="on" casesensitive="on" nosearch="on" format="<option>$topic</option>" sort="topic" excludetopic="Test*, TWiki*"}%
</select>
<input type="submit" value="Go" />
</form>
In the above example:
-
META:FORM.*[U]serForm will search for all topics with a UserForm? attached - change this if you have a different form where userdata is stored. Please note that this search does not actually extract anything from the form - it just uses it to identify the appropriate pages
-
excludetopic="Test*, TWiki*" allows to skip all topics starting with Test and TWiki, such as TestUser or TWikiAdmin. Use this if you have any special users who you do not want appearing in this list
|