Commit 65a0d96a authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

koha: make LoginBranchcode available to templates

This fixes adding internal patron messages
parent 30ca57c3
......@@ -190,16 +190,17 @@ sub templateAndPermissions {
# );
#}
$self->setTemplatePermissions( $template, $auth, $branch );
$self->setTemplatePermissions( $template, $auth, $branch, $auth->{user}->{branchcode} );
$self->setCustomTemplateParams( $template ); # Various overrides from previous C4::Auth::get_template_and_user
return $template;
}
# set template permissions from auth object
sub setTemplatePermissions {
my ($self, $template, $auth, $branch) = @_;
my ($self, $template, $auth, $branchname, $branchcode) = @_;
$template->param( LoginBranchname => $branch );
$template->param( LoginBranchname => $branchname );
$template->param( LoginBranchcode => $branchcode );
my $id = $self->{session}->get("id");
if ($self->{session}->get("admin")) {
# Admin user login should be removed!
......
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