[Catalyst] Patch for Catalyst::Authentication::Store::DBIx::Class::User

Bogdan Lucaciu bogdan at wiz.ro
Thu Aug 21 22:31:20 BST 2008

On Thursday 21 August 2008 23:12:40 David Jack Wange Olrik wrote:
> Wouldn't it be neat to have the username field configurable, just
> like 'password_field' ?

You don't need that, read this:

    if ($c->authenticate({  
                          username => $c->req->params->{'username'},
                          password => $c->req->params->{'password'},
                          status => [ 'registered', 'active', 'loggedin']
                         })) {

These name => value pairs are used more or less directly in the DBIx::Class' 
search() routine, so in most cases, you can use DBIx::Class syntax to retrieve 
the user according to whatever rules you have.

Basically you pass whatever hashref you need to $c->authenticate. The 
password_field is necessary because of the possible changes done by 
Credential::Password .

Bogdan Lucaciu 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080822/6929845a/attachment.htm

More information about the Catalyst mailing list