https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24754 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Failed QA --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The patch does this: +# Set the userenv +C4::Context->_new_userenv(1); +C4::Context->set_userenv( + undef, undef, undef, 'ILSDI', 'ILSDI', undef, + undef, undef, undef, undef, undef +); +C4::Context->interface('opac'); For comparison, misc/commit_file.pl does this: # 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'); And Koha::Script does this: C4::Context->_new_userenv(1); C4::Context->set_userenv( undef, undef, undef, 'CRON', 'CRON', undef, undef, undef, undef, undef ); Might be that the author copied this part of the code? (I think it should be adapted; see below.) The sub _new_userenv stores a sessionID in activeuser (which is quite confusing). I would not recommend to always use session 1. (Session id is a varchar(32) btw.) Why not use "ILSDI_session", possibly followed by a few digits or so? Another note: 11 parameters are passed in ilsdi.pl and Koha::Script. I only count 10. We're copy&pasting an error here. shift @_; # this is the object my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $shibboleth)= [etc] # these are 10 -- You are receiving this mail because: You are watching all bug changes.