Lines 25-30
use String::Random qw( random_string );
Link Here
|
25 |
|
25 |
|
26 |
use C4::Auth; |
26 |
use C4::Auth; |
27 |
use C4::Output; |
27 |
use C4::Output; |
|
|
28 |
use C4::Context; |
28 |
use C4::Members; |
29 |
use C4::Members; |
29 |
use C4::Form::MessagingPreferences; |
30 |
use C4::Form::MessagingPreferences; |
30 |
use Koha::AuthUtils; |
31 |
use Koha::AuthUtils; |
Lines 299-304
elsif ( $action eq 'update' ) {
Link Here
|
299 |
Koha::Patron::Modifications->search({ borrowernumber => $borrowernumber })->delete; |
300 |
Koha::Patron::Modifications->search({ borrowernumber => $borrowernumber })->delete; |
300 |
|
301 |
|
301 |
my $m = Koha::Patron::Modification->new( \%borrower_changes )->store(); |
302 |
my $m = Koha::Patron::Modification->new( \%borrower_changes )->store(); |
|
|
303 |
#Automatically approve patron profile changes if set in syspref |
304 |
|
305 |
if (C4::Context->preference('AutoApprovePatronProfileSettings')) { |
306 |
# Need to get the object from database, otherwise it is not complete enough to allow deletion |
307 |
# when approval has been performed. |
308 |
my $tmp_m = Koha::Patron::Modifications->find({borrowernumber => $borrowernumber}); |
309 |
$tmp_m->approve() if $tmp_m; |
310 |
} |
302 |
|
311 |
|
303 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
312 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
304 |
$template->param( borrower => $patron->unblessed ); |
313 |
$template->param( borrower => $patron->unblessed ); |
305 |
- |
|
|