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

(-)a/Koha/Auth/Client.pm (-5 / +6 lines)
Lines 64-69 sub get_user { Link Here
64
64
65
    my ( $mapped_data, $patron ) = $self->_get_data_and_patron({ provider => $provider, data => $data, config => $config });
65
    my ( $mapped_data, $patron ) = $self->_get_data_and_patron({ provider => $provider, data => $data, config => $config });
66
66
67
    $mapped_data //= {};
68
69
    my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface});
70
67
    # Call the plugin hook "auth_client_get_user" of all plugins in
71
    # Call the plugin hook "auth_client_get_user" of all plugins in
68
    # ascending priority.
72
    # ascending priority.
69
    if ( C4::Context->config('enable_plugins') ) {
73
    if ( C4::Context->config('enable_plugins') ) {
Lines 79-96 sub get_user { Link Here
79
            config      => $config,
83
            config      => $config,
80
            mapped_data => $mapped_data,
84
            mapped_data => $mapped_data,
81
            patron      => $patron,
85
            patron      => $patron,
86
            domain      => $domain,
82
        };
87
        };
83
        foreach my $plugin (@plugins) {
88
        foreach my $plugin (@plugins) {
84
            $plugin->auth_client_get_user($args);
89
            $plugin->auth_client_get_user($args);
85
        }
90
        }
86
        $mapped_data = $args->{'mapped_data'};
91
        $mapped_data = $args->{'mapped_data'};
87
        $patron      = $args->{'patron'};
92
        $patron      = $args->{'patron'};
93
        $domain      = $args->{'domain'};
88
    }
94
    }
89
95
90
    $mapped_data //= {};
91
92
    my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface});
93
94
    $patron->set($mapped_data)->store if $patron && $domain->update_on_auth;
96
    $patron->set($mapped_data)->store if $patron && $domain->update_on_auth;
95
97
96
    $mapped_data->{categorycode} = $domain->default_category_id;
98
    $mapped_data->{categorycode} = $domain->default_category_id;
97
- 

Return to bug 36503