CurrentUserEmail

From Request Tracker Wiki
Jump to navigation Jump to search

Sort of a corollary to <strong>CurrentUser</strong>, which returns the Current user id in searches, <strong>CurrentUserEmail</strong> allows you to search against the logged in user's email address. (Thus allowing the return of "MyRequestedTickets" from ver2 of RT by matching <strong>CurrentUserEmail</strong> against Requestor in a search) 1 - cd $rt_home 2 - cp lib/RT/Tickets_Overlay_SQL.pm local/lib/RT/Tickets_Overlay_SQL.pm 3 - apply the below diff (which really only adds the three lines. $ diff -c lib/RT/Tickets_Overlay_SQL.pm local/lib/RT/Tickets_Overlay_SQL.pm *** lib/RT/Tickets_Overlay_SQL.pm Wed Jul 30 16:08:43 2008 --- local/lib/RT/Tickets_Overlay_SQL.pm Wed Jul 30 17:25:34 2008 <hr /> *** 294,299 **** --- 294,302 ---- # replace <strong>CurrentUser</strong> with id $val = $self->CurrentUser->id if $val eq '<strong>CurrentUser</strong>'; <ul> <li># replace <strong>CurrentUserEmail</strong> with email address</li> <li>$val = $self->CurrentUser->EmailAddress if $val eq '<strong>CurrentUserEmail</strong>';</li> <li>my $subkey = ''; if ($key =~ /^(.+?).(.+)$/) {