View | Details | Raw Unified | Return to bug 30889
Collapse All | Expand All

(-)a/misc/background_jobs_worker.pl (-2 / +15 lines)
Lines 121-126 sub process_job { Link Here
121
121
122
    die "fork failed!" unless defined $pid;
122
    die "fork failed!" unless defined $pid;
123
123
124
    $job->process( $args );
124
    my $patron = Koha::Patrons->find($job->borrowernumber);
125
    if ( $patron ) {
126
        C4::Context->_new_userenv(-1);
127
        C4::Context->set_userenv(
128
            $patron->borrowernumber,      $patron->userid,
129
            $patron->cardnumber,          $patron->firstname,
130
            $patron->surname,            $patron->branchcode,
131
            $patron->library->branchname, $patron->flags
132
        );
133
        $job->process( $args );
134
        C4::Context->_unset_userenv(-1);
135
    } ese {
136
        $job->process( $args );
137
    }
138
125
    exit;
139
    exit;
126
}
140
}
127
- 

Return to bug 30889