[Koha-devel] Auth.pm

Finlay Thompson finlay at katipo.co.nz
Tue Dec 3 20:45:05 CET 2002


Hi Everyone,

I have just commited into the main branch the substantially rewritten 
Auth.pm authentification module from the rel-1-2 branch (as in use at HLT).

The biggest change is the get_template_and_user () sub. This combines a 
whole lot of code that I had at the top of every script. It gets the 
correct template, and authenticates the user, loading the users details 
into the template (in a loop variable USER_INFO).

This means that you dont need to "use C4::Output;" in the scripts, just 
"use C4::Auth;"

In addition I have put in some code that checks the systempreferences 
for a "timeout" time in seconds, otherwise it defaults to 120 sec (2 mins).

The login prompt is now templated as well (important for new opac). This 
is found at opac-auth.tmpl for the opac and auth.tmpl for the intranet.

It uses Context as all good main branch modules and scripts should. It 
also uses Output to get the template objects.

It uses Circulation::Circ2 to get the borrower information which is a 
little weird. It would be good to have a Users.pm module that Circ and 
everything else could use that accessed all the users information and 
returned it in a uniform way. Maybe even OO?

Anyway,
thats the new Auth.pm

Finlay






More information about the Koha-devel mailing list