What is going on is that some searches used on the front page have that special variable in them and the components that display the search results substitute __CurrentUser__ before passing the search to the search engine. It would be better if search parser handled this at a lower level, but it doesn't.
<br><br><div><span class="gmail_quote">On 1/7/08, <b class="gmail_sendername">Steve Cochran</b> <<a href="mailto:stephen.cochran@kingarthurflour.com">stephen.cochran@kingarthurflour.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I think I might have found something weird going on. One of the<br>included searches uses the special string "__CurrentUser__" as a<br>search term. This is mapped in the Elements/ShowSearch file to be<br>$session{"CurrentUser"}->Id.
<br><br>Now the search works properly on the front page, but if you go into<br>the query (edit -> edit predefined search) and choose "Show Results",<br>I get no results back. Is it possible that this variable is not being
<br>replaced in some locations?<br><br>What's even weirder is that I enabled mysql query logging, and I saw<br>the value "__CurrentUser__" being passed to the database from<br>different places, including the front page where the query seems to
<br>work.<br><br><br>All this is getting back to creating a "My Requests" search that works<br>for all users. I have a query that works if I put my username in, but<br>I can't get a query for the current logged in user working.
<br><br>Steve<br>_______________________________________________<br><a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br><br>SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
<br><br>If you sign up for a new RT support contract before December 31, we'll take<br>up to 20 percent off the price. This sale won't last long, so get in touch today.<br> Email us at <a href="mailto:sales@bestpractical.com">
sales@bestpractical.com</a> or call us at +1 617 812 0745.<br><br><br>Community help: <a href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a><br>Commercial support: <a href="mailto:sales@bestpractical.com">
sales@bestpractical.com</a><br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>Buy a copy at <a href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a><br></blockquote>
</div><br>