use strict;
#use warnings; FIXME - Bug 2505
use Digest::MD5 qw(md5_base64);
+use CGI::Session;
use File::Spec;
require Exporter;
+
use C4::Context;
use C4::Output;
use C4::Templates;
use C4::Koha;
-use CGI::Session;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$template->param( CAN_user_editcatalogue => 1 );
$template->param( CAN_user_updatecharges => 1 );
$template->param( CAN_user_acquisition => 1 );
- $template->param( CAN_user_management => 1 );
$template->param( CAN_user_tools => 1 );
$template->param( CAN_user_editauthorities => 1 );
$template->param( CAN_user_serials => 1 );
$template->param( CAN_user_reports => 1 );
}
+
+ my $minPasswordLength = C4::Context->preference('minPasswordLength');
+ $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3;
+ $template->param(minPasswordLength => $minPasswordLength,);
}
return ( $template, $borrowernumber, $cookie );
}
my $dbh = C4::Context->dbh();
my $template_name;
$template_name = "installer/auth.tt";
- my $sessdir = File::Spec->catdir( File::Spec->tmpdir, 'cgisess_' . C4::Context->config('database') ); # same construction as in C4/Auth
+ my $sessdir = File::Spec->catdir( C4::Context::temporary_directory, 'cgisess_' . C4::Context->config('database') ); # same construction as in C4/Auth
# state variables
my $loggedin = 0;
);
return 2;
}
- if ( $userid
- && $userid eq 'demo'
- && "$password" eq 'demo'
- && C4::Context->config('demo') )
- {
-
-# DEMO => the demo user is allowed to do everything (if demo set to 1 in koha.conf
-# some features won't be effective : modify systempref, modify MARC structure,
- return 2;
- }
return 0;
}