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::Members::Attributes qw( GetBorrowerAttributes ); |
30 |
use C4::Members::Attributes qw( GetBorrowerAttributes ); |
30 |
use C4::Form::MessagingPreferences; |
31 |
use C4::Form::MessagingPreferences; |
Lines 281-286
elsif ( $action eq 'update' ) {
Link Here
|
281 |
} |
282 |
} |
282 |
|
283 |
|
283 |
my $m = Koha::Patron::Modification->new( \%borrower_changes )->store(); |
284 |
my $m = Koha::Patron::Modification->new( \%borrower_changes )->store(); |
|
|
285 |
#Automatically approve patron profile changes if set in syspref |
286 |
|
287 |
if (C4::Context->preference('AutoApprovePatronProfileSettings')) { |
288 |
# Need to get the object from database, otherwise it is not complete enough to allow deletion |
289 |
# when approval has been performed. |
290 |
my $tmp_m = Koha::Patron::Modifications->find({borrowernumber => $borrowernumber}); |
291 |
$tmp_m->approve() if $tmp_m; |
292 |
} |
284 |
|
293 |
|
285 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
294 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
286 |
$template->param( borrower => $patron->unblessed ); |
295 |
$template->param( borrower => $patron->unblessed ); |
287 |
- |
|
|