Lines 68-97
sub get_user {
Link Here
|
68 |
|
68 |
|
69 |
my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface}); |
69 |
my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface}); |
70 |
|
70 |
|
71 |
# Call the plugin hook "auth_client_get_user" of all plugins in |
71 |
# Call the plugin hook "auth_client_get_user" of all plugins. |
72 |
# ascending priority. |
72 |
my $args = { |
73 |
if ( C4::Context->config('enable_plugins') ) { |
73 |
provider => $provider, |
74 |
my @plugins = Koha::Plugins->new()->GetPlugins( |
74 |
data => $data, |
75 |
{ |
75 |
config => $config, |
76 |
method => 'auth_client_get_user', |
76 |
mapped_data => $mapped_data, |
77 |
} |
77 |
patron => $patron, |
78 |
); |
78 |
domain => $domain, |
79 |
@plugins = sort { $a->retrieve_data('priority') <=> $b->retrieve_data('priority') } @plugins; |
79 |
}; |
80 |
my $args = { |
80 |
Koha::Plugins->call('auth_client_get_user', $args); |
81 |
provider => $provider, |
81 |
$mapped_data = $args->{'mapped_data'}; |
82 |
data => $data, |
82 |
$patron = $args->{'patron'}; |
83 |
config => $config, |
83 |
$domain = $args->{'domain'}; |
84 |
mapped_data => $mapped_data, |
|
|
85 |
patron => $patron, |
86 |
domain => $domain, |
87 |
}; |
88 |
foreach my $plugin (@plugins) { |
89 |
$plugin->auth_client_get_user($args); |
90 |
} |
91 |
$mapped_data = $args->{'mapped_data'}; |
92 |
$patron = $args->{'patron'}; |
93 |
$domain = $args->{'domain'}; |
94 |
} |
95 |
|
84 |
|
96 |
$patron->set($mapped_data)->store if $patron && $domain->update_on_auth; |
85 |
$patron->set($mapped_data)->store if $patron && $domain->update_on_auth; |
97 |
|
86 |
|
98 |
- |
|
|