[rt-users] __CurrentUser__

Todd Chapman todd at chaka.net
Mon Jan 7 21:59:37 EST 2008

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

On 1/7/08, Steve Cochran <stephen.cochran at kingarthurflour.com> wrote:
> I think I might have found something weird going on. One of the
> included searches uses the special string "__CurrentUser__" as a
> search term. This is mapped in the Elements/ShowSearch file to be
> $session{"CurrentUser"}->Id.
> Now the search works properly on the front page, but if you go into
> the query (edit -> edit predefined search) and choose "Show Results",
> I get no results back. Is it possible that this variable is not being
> replaced in some locations?
> What's even weirder is that I enabled mysql query logging, and I saw
> the value "__CurrentUser__" being passed to the database from
> different places, including the front page where the query seems to
> work.
> All this is getting back to creating a "My Requests" search that works
> for all users. I have a query that works if I put my username in, but
> I can't get a query for the current logged in user working.
> Steve
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> If you sign up for a new RT support contract before December 31, we'll
> take
> up to 20 percent off the price. This sale won't last long, so get in touch
> today.
>     Email us at sales at bestpractical.com or call us at +1 617 812 0745.
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080107/059dd0e7/attachment.htm>

More information about the rt-users mailing list