[rt-users] __CurrentUser__

Steve Cochran stephen.cochran at kingarthurflour.com
Mon Jan 7 21:38:47 EST 2008


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



More information about the rt-users mailing list