and checking that the store can auto_create and auto_update when requested
my $res = $self->store->find_user($authinfo, $c);
- if (!$res && $self->config->{'auto_create'} ) {
- $res = $self->store->auto_create($authinfo, $c);
- }
+ if (!$res) {
+ if ($self->config->{'auto_create'} && $self->store->can('auto_create') ) {
+ $res = $self->store->auto_create($authinfo, $c);
+ }
+ } elsif ($self->config->{'auto_update'} && $self->store->can('auto_update')) {
+ $res = $self->store->auto_update($authinfo, $c);
+ }
return $res;
}