# Set userenv
C4::Context->_new_userenv(1);
C4::Context->set_userenv(
- undef, undef, undef, 'CRON', 'CRON', undef,
+ undef, undef, undef, 'CRON', 'CRON',
undef, undef, undef, undef, undef
);
else {
# Set userenv
C4::Context->set_userenv(
- undef, undef, undef, 'CLI', 'CLI', undef,
+ undef, undef, undef, 'CLI', 'CLI',
undef, undef, undef, undef, undef
);
# FIXME dummy user so that logging won't fail
# in future, probably should tie to a real user account
-C4::Context->set_userenv(0, 'batch', 0, 'batch', 'batch', 'batch', 'batch', 'batch');
+C4::Context->set_userenv(0, 'batch', 0, 'batch', 'batch', 'batch', 'batch');
my $dbh = C4::Context->dbh;
$dbh->{AutoCommit} = 0;
use Koha::Token;
C4::Context->_new_userenv('DUMMY SESSION');
-C4::Context->set_userenv(0,42,0,'firstname','surname', 'CPL', 'Library 1', 0, ', ');
+C4::Context->set_userenv(0,42,0,'firstname','surname', 'CPL', 'Library 1', 0, '');
my $tokenizer = Koha::Token->new;
is( length( $tokenizer->generate ), 1, "Generate without parameters" );
$result = $tokenizer->check_csrf({
session_id => $id, token => $csrftoken,
});
- is( $result, 1, "CSRF token verified" );
- C4::Context->set_userenv(0,43,0,'firstname','surname', 'CPL', 'Library 1', 0, ', ');
+ C4::Context->set_userenv(0,43,0,'firstname','surname', 'CPL', 'Library 1', 0, '');
$result = $tokenizer->check_csrf({
session_id => $id, token => $csrftoken,
});
subtest 'Same logged in user with another session (cookie CGISESSID)' => sub {
plan tests => 2;
- C4::Context->set_userenv(0,42,0,'firstname','surname', 'CPL', 'Library 1', 0, ', ');
+ C4::Context->set_userenv(0,42,0,'firstname','surname', 'CPL', 'Library 1', 0, '');
$csrftoken = $tokenizer->generate_csrf({ session_id => $id });
$result = $tokenizer->check_csrf({
session_id => $id, token => $csrftoken,