passing in user object
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 16:38:00 +0000 (16:38 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 16:38:00 +0000 (16:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1866 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm

index d85f7df..6fb1488 100644 (file)
@@ -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;