Commit 8bc73d5d authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

koha: respect change branch param

parent a7640a98
......@@ -161,15 +161,14 @@ sub templateAndPermissions {
# Use new auth object
my $auth = $self->{session}->get("auth");
my $branch = $auth->{user}->{branchcode} || $self->{session}->param("branchname");
my $userid = $auth->{user}->{userid} || $self->{session}->param("userid");
my $branch = $self->{session}->param("branchname") || $auth->{user}->{branchcode}; # session param overrides stored branch
my $userid = $self->{session}->param("userid") || $auth->{user}->{userid}; # session param overrides stored userid
my $flags = $in->{flagsrequired};
use Data::Dumper; warn Dumper($auth);
my $info = {};
# admins have 'id' set, not 'userid'
# no login - present login page
# no session - present login page (admins have 'id' set, not 'userid' - TODO fix)
if (not $userid and not $self->{session}->param("id") and !$in->{authnotrequired}) {
my $auth_template = "auth.tt";
my $template = C4::Templates::gettemplate( $auth_template, $in->{type}, $self);
......
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