Revision history for Catalyst-Plugin-Authentication-Store-DBIx-Class
+0.105 2008-03-19
+ Throw an exception if no fields are provided during authenticate
+ - better than retrieving a random user.
+ - still possible to do an empty search by using searchargs
+
+
0.104 2008-02-15
Added ability to avoid DB hits when restoring from session
$searchargs->{$key} = $authinfo->{$key};
}
}
- $self->_user($self->resultset->search($searchargs)->first);
+ if (keys %{$searchargs}) {
+ $self->_user($self->resultset->search($searchargs)->first);
+ } else {
+ Catalyst::Exeption->throw("User retrieval failed: no columns from " . $self->config->{'user_class'} . " were provided");
+ }
}
if ($self->get_object) {
if (exists($self->config->{'role_column'})) {
my $role_data = $self->get($self->config->{'role_column'});
if ($role_data) {
- @roles = split /[ ,\|]+/, $self->get($self->config->{'role_column'});
+ @roles = split /[\s,\|]+/, $self->get($self->config->{'role_column'});
}
$self->_roles(\@roles);
} elsif (exists($self->config->{'role_relation'})) {