|
Lines 183-193
sub get_template_and_user {
Link Here
|
| 183 |
$in->{'query'}, |
183 |
$in->{'query'}, |
| 184 |
); |
184 |
); |
| 185 |
|
185 |
|
| 186 |
my $request_method = $in->{query}->request_method // q{}; |
186 |
if ( C4::Context->preference('AutoSelfCheckAllowed') && $in->{template_name} =~ m|sco/| ) { |
| 187 |
unless ( $request_method eq 'POST' && $in->{query}->param('op') eq 'cud-login' ) { |
187 |
my $AutoSelfCheckID = C4::Context->preference('AutoSelfCheckID'); |
| 188 |
for my $v ( qw( login_userid login_password ) ) { |
188 |
my $AutoSelfCheckPass = C4::Context->preference('AutoSelfCheckPass'); |
| 189 |
$in->{query}->param($v, '') |
189 |
$in->{query}->param( -name => 'login_userid', -values => [$AutoSelfCheckID] ); |
| 190 |
if $in->{query}->param($v); |
190 |
$in->{query}->param( -name => 'login_password', -values => [$AutoSelfCheckPass] ); |
|
|
191 |
$in->{query}->param( -name => 'koha_login_context', -values => ['sco'] ); |
| 192 |
} else { |
| 193 |
my $request_method = $in->{query}->request_method // q{}; |
| 194 |
unless ( $request_method eq 'POST' && $in->{query}->param('op') eq 'cud-login' ) { |
| 195 |
for my $v (qw( login_userid login_password )) { |
| 196 |
$in->{query}->param( $v, '' ) |
| 197 |
if $in->{query}->param($v); |
| 198 |
} |
| 191 |
} |
199 |
} |
| 192 |
} |
200 |
} |
| 193 |
|
201 |
|