I have a weird issue with userlists:
I have 2 userlists. Userlist1 is accessible for guests, userlist2 for registered users.
In the backend for each userlist a link is shown for calling the search function. I am using these links and everything works find: Link1 opens the seach function for userlist1, link2 for userlist2.
This changes completely when I remove the userlist change dropdownfield by uncommenting the corresponding lines in comprofiler.html.php:
[code:1] <div class="cbUserListChanger">
<!--<?php
// selector for user-list:
if ( ( $lists !== null ) || ( count( $lists ) > 1 ) ) {
foreach ( $lists as $kname => $ncontent ) {
?>
<div class="cbUserListChangeItem cbUserList<?php echo $kname; ?>"><?php
echo $ncontent;
?></div>
<?php
}
}
if ( count( $searchableFields ) > 0 ) {
if ( $search === null ) {
?>
<div class="cbUserListSearchButtons" id="cbUserListsSearchTrigger"><a class="pagenav" href="#"><?php echo _UE_SEARCH_USERS; ?></a></div>
<?php
} else {
?>-->
<div id="cbUserListListAll"><a class="pagenav" href="<?php echo cbSef($ue_base_url); ?>" onclick="javascript:adminForm.search.value=''"><?php echo _UE_LIST_ALL; ?></a></div>
<!--<?php
}
}
?>-->
</div>
[/code:1]
After this change the dropdownfield is no longer visible, but only search results of userlist1 show up.
Using the link to the search function of userlist2 opens the search function for userlist2 but when pressing the search buttons, it switches to userlist1 and presenting its results only.
So it seems that in some way the dropdownfield is connected with the seach result page and when the dropdownfield is disabled this value does not get passed on so that the correct userlist gets displayed. I wonder what code changes are necessary to pass the userlist information to the result page.