Commit fc839cce authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

koha: small fix to Deichman::Auth

parent ed236435
......@@ -47,23 +47,21 @@ sub Auth {
my $session = $self->{session};
my $req = $self->{req};
C4::Context->_new_userenv( $session->id );
$session or Deichman::Exception::Auth::InvalidSession->throw();
$req or Deichman::Exception::Auth::InvalidQuery->throw();
C4::Context->_new_userenv( $session->id );
if ($req->param("logout.x") ) {
$self->LogOut();
}
# validate session
my $auth = $session->get("auth");
if ($auth) {
warn "GOT AUTH SESSION";
$session->put(auth => $auth);
#use Data::Dumper; warn Dumper($session);
warn "GOT AUTHENTICATED SESSION";
return;
} else {
warn "NO AUTH SESSION";
warn "NO AUTH SESSION - TRYING TO CREATE ONE";
# Run all auth methods
my $auth = $self->checkAuthMethods();
$auth or Deichman::Exception::Auth::InvalidSession->throw();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment