[Catalyst] Using Progressive realms when username and password fields are all different

2012-06-28 Thread Gavin Henry
Hi all, I have three realms; customers, resellers and admins. Each auth table in these realms is not consistent and uses different username_filed and password_field names. I can't change this. Now the normal way is to do: if ( $c-authenticate( {

Re: [Catalyst] Using Progressive realms when username and password fields are all different

2012-06-28 Thread Tim Anderson
Gavin, Assuming you are using the Authentication plugin, you can define multiple realm objects, each of which allows you to specify the columns to be used for username and password. The documentation is pretty good on this one, and it's working well for me.

Re: [Catalyst] Using Progressive realms when username and password fields are all different

2012-06-28 Thread Gavin Henry
On 28 June 2012 21:50, Tim Anderson tja...@gmail.com wrote: Gavin, Assuming you are using the Authentication plugin, you can define multiple realm objects, each of which allows you to specify the columns to be used for username and password.  The documentation is pretty good on this one, and

Re: [Catalyst] Using Progressive realms when username and password fields are all different

2012-06-28 Thread Tim Anderson
That keys in the hash reference you are passing to the authenticate function should match the keys in your CcAgent model, plus the password field you defined in your config... something like this: # Attempt to log the user in if ( $c-authenticate( {

Re: [Catalyst] Using Progressive realms when username and password fields are all different

2012-06-28 Thread Gavin Henry
On 28 June 2012 23:08, Tim Anderson tja...@gmail.com wrote: That keys in the hash reference you are passing to the authenticate function should match the keys in your CcAgent model, plus the password field you defined in your config... something like this: # Attempt to log the user in