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

(-)a/Koha/Patron.pm (-3 / +3 lines)
Lines 1088-1094 sub set_password { Link Here
1088
                    module      => 'members',
1088
                    module      => 'members',
1089
                    letter_code => 'PASSWORD_CHANGE',
1089
                    letter_code => 'PASSWORD_CHANGE',
1090
                    branchcode  => $self_from_storage->branchcode,
1090
                    branchcode  => $self_from_storage->branchcode,
1091
                    ,
1091
1092
                    lang   => $self_from_storage->lang || 'default',
1092
                    lang   => $self_from_storage->lang || 'default',
1093
                    tables => {
1093
                    tables => {
1094
                        'branches'  => $self_from_storage->branchcode,
1094
                        'branches'  => $self_from_storage->branchcode,
Lines 2582-2588 Or setter FIXME Link Here
2582
=cut
2582
=cut
2583
2583
2584
sub extended_attributes {
2584
sub extended_attributes {
2585
    my ( $self, $attributes ) = @_;
2585
    my ( $self, $attributes, $options ) = @_;
2586
2586
2587
    if ($attributes) {    # setter
2587
    if ($attributes) {    # setter
2588
        my %attribute_changes;
2588
        my %attribute_changes;
Lines 2674-2680 sub extended_attributes { Link Here
2674
                    'borrower_attribute_types_branches.b_branchcode' => undef,
2674
                    'borrower_attribute_types_branches.b_branchcode' => undef,
2675
                };
2675
                };
2676
2676
2677
                if ( $interface eq 'opac' ) {
2677
                if ( $interface eq 'opac' || $options->{act_as_opac} ) {
2678
                    $params->{opac_editable} = 1;
2678
                    $params->{opac_editable} = 1;
2679
                }
2679
                }
2680
2680
(-)a/Koha/REST/V1/Patrons.pm (-3 / +5 lines)
Lines 122-131 sub add { Link Here
122
122
123
                my $patron = Koha::Patron->new_from_api($body)->store;
123
                my $patron = Koha::Patron->new_from_api($body)->store;
124
124
125
                $patron->extended_attributes(
126
                    [ map { { code => $_->{type}, attribute => $_->{value} } } @$extended_attributes ] );
127
128
                my $overrides = $c->stash('koha.overrides');
125
                my $overrides = $c->stash('koha.overrides');
126
127
                $patron->extended_attributes(
128
                    [ map { { code => $_->{type}, attribute => $_->{value} } } @$extended_attributes ],
129
                    { act_as_opac => $overrides->{act_as_opac} }
130
                );
129
                if ( $overrides->{welcome_yes}
131
                if ( $overrides->{welcome_yes}
130
                    || ( C4::Context->preference("AutoEmailNewUser") && !$overrides->{welcome_no} ) )
132
                    || ( C4::Context->preference("AutoEmailNewUser") && !$overrides->{welcome_no} ) )
131
                {
133
                {
(-)a/api/v1/swagger/paths/patrons.yaml (-1 / +1 lines)
Lines 435-440 Link Here
435
          enum:
435
          enum:
436
            - welcome_yes
436
            - welcome_yes
437
            - welcome_no
437
            - welcome_no
438
            - act_as_opac
438
        collectionFormat: csv
439
        collectionFormat: csv
439
    consumes:
440
    consumes:
440
      - application/json
441
      - application/json
441
- 

Return to bug 40220