From 7a380d130f533d77e674d2013fcb5d82d1179799 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 23 Sep 2005 16:38:00 +0000 Subject: [PATCH] passing in user object git-svn-id: svn://svn.open-ils.org/ILS/trunk@1866 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm index d85f7df75d..6fb148884d 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm @@ -56,9 +56,10 @@ sub handler { (my $ttk = $path) =~ s{^/?([a-zA-Z0-9_]+).*?$}{$1}o; $ttk = "s1" unless $ttk; + my $user; # if the user is not logged in via cookie, route them to the login page - if(!(verify_login( $cgi->cookie("ses") ))) { + if(! ($user = verify_login($cgi->cookie("ses"))) ) { $ttk = "login"; } @@ -67,7 +68,11 @@ sub handler { _process_template( apache => $apache, template => "$ttk.ttk", - params => { stage_dir => $ttk, config_xml => $base_xml }, + params => { + user => $user, + stage_dir => $ttk, + config_xml => $base_xml, + }, ); return Apache2::Const::OK; -- 2.43.2