[Catalyst] Authentication with
Catalyst::Authentication::Store::DBIx::Class
Caleb Cushing
xenoterracide at gmail.com
Sat Mar 27 06:16:53 GMT 2010
On Fri, Mar 26, 2010 at 2:33 PM, Michael Peck <mapeck65 at gmail.com> wrote:
> prefer to have a list of valid statuses, and a more normalized database.
> What if, in the database, we have a table of statuses, such as:
>
> id | status
> 1 | registered
> 2 | active
> 3 | loggedin
> ...
>
> ...and we store the status id in our user model...how would I handle the
> authenticate method call?
I'm personally not sure I'd consider that normalized since a user
could be all 3. I'd have a boolean and 3 columns, and I think it'd be
more normalized. then you can just check the bool. although I'm not
sure why you want to check any of those at authentication. One of the
only other fields I check is a boolean 'enabled' because I want to be
able to disable user accounts, and a disabled account can't
authenticate. also if a users's status is 'logged in' why are we
logging them in again?
I post apologize because I don't actually know how to do what you are
trying to do... but I suppose I commented because I even less
understand why.
--
Caleb Cushing
http://xenoterracide.blogspot.com
More information about the Catalyst
mailing list