|
Lines 666-671
sub userenv {
Link Here
|
| 666 |
return $context->{userenv}; |
666 |
return $context->{userenv}; |
| 667 |
} |
667 |
} |
| 668 |
|
668 |
|
|
|
669 |
sub set_userenv_from_session { |
| 670 |
my ( $class, $session ) = @_; |
| 671 |
return $class->set_userenv( |
| 672 |
$session->param('number'), $session->param('id') // '', |
| 673 |
$session->param('cardnumber'), $session->param('firstname'), |
| 674 |
$session->param('surname'), $session->param('branch'), |
| 675 |
$session->param('branchname'), $session->param('flags'), |
| 676 |
$session->param('emailaddress'), $session->param('shibboleth'), |
| 677 |
$session->param('desk_id'), $session->param('desk_name'), |
| 678 |
$session->param('register_id'), $session->param('register_name'), |
| 679 |
$session->id, |
| 680 |
); |
| 681 |
} |
| 682 |
|
| 669 |
=head2 set_userenv |
683 |
=head2 set_userenv |
| 670 |
|
684 |
|
| 671 |
C4::Context->set_userenv($usernum, $userid, $usercnum, |
685 |
C4::Context->set_userenv($usernum, $userid, $usercnum, |
|
Lines 685-694
set_userenv is called in Auth.pm
Link Here
|
| 685 |
sub set_userenv { |
699 |
sub set_userenv { |
| 686 |
shift @_; |
700 |
shift @_; |
| 687 |
my ( |
701 |
my ( |
| 688 |
$usernum, $userid, $usercnum, $userfirstname, |
702 |
$usernum, $userid, $usercnum, $userfirstname, |
| 689 |
$usersurname, $userbranch, $branchname, $userflags, |
703 |
$usersurname, $userbranch, $branchname, $userflags, |
| 690 |
$emailaddress, $shibboleth, $desk_id, $desk_name, |
704 |
$emailaddress, $shibboleth, $desk_id, $desk_name, |
| 691 |
$register_id, $register_name |
705 |
$register_id, $register_name, $session_id, |
| 692 |
) = @_; |
706 |
) = @_; |
| 693 |
|
707 |
|
| 694 |
my $cell = { |
708 |
my $cell = { |
|
Lines 707-713
sub set_userenv {
Link Here
|
| 707 |
"desk_id" => $desk_id, |
721 |
"desk_id" => $desk_id, |
| 708 |
"desk_name" => $desk_name, |
722 |
"desk_name" => $desk_name, |
| 709 |
"register_id" => $register_id, |
723 |
"register_id" => $register_id, |
| 710 |
"register_name" => $register_name |
724 |
"register_name" => $register_name, |
|
|
725 |
"session_id" => $session_id, |
| 711 |
}; |
726 |
}; |
| 712 |
$context->{userenv} = $cell; |
727 |
$context->{userenv} = $cell; |
| 713 |
return $cell; |
728 |
return $cell; |