Adding session storage to the other place sessions are made
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
47db7248a2
commit
3185814348
1 changed files with 13 additions and 5 deletions
18
C4/Auth.pm
18
C4/Auth.pm
|
@ -493,12 +493,20 @@ sub checkauth {
|
|||
}
|
||||
}
|
||||
unless ($userid) {
|
||||
# my $session = new CGI::Session("driver:MySQL", undef, {Handle=>$dbh});
|
||||
my $session = new CGI::Session("driver:File", undef, {Directory=>'/tmp'});
|
||||
my $storage_method = C4::Context->preference('SessionStorage');
|
||||
my $session;
|
||||
if ($storage_method eq 'mysql'){
|
||||
$session = new CGI::Session("driver:MySQL", $sessionID, {Handle=>$dbh});
|
||||
}
|
||||
else {
|
||||
# catch all defaults to tmp should work on all systems
|
||||
$session = new CGI::Session("driver:File", $sessionID, {Directory=>'/tmp'});
|
||||
}
|
||||
|
||||
my $sessionID;
|
||||
if ($session) {
|
||||
$sessionID = $session->id;
|
||||
}
|
||||
if ($session) {
|
||||
$sessionID = $session->id;
|
||||
}
|
||||
$userid = $query->param('userid');
|
||||
C4::Context->_new_userenv($sessionID);
|
||||
my $password = $query->param('password');
|
||||
|
|
Loading…
Reference in a new issue