On Tue, 14 Apr 2009 01:06:38 -0400
Mark Rajcok <[email protected]> wrote:
> I'm using CAP:Authentication and I have a u_state field in my Users table.
> The u_state field is a MySQL enum, and can be set to created, active,
> restricted, or disabled.
>
> I'm trying to figure out how I can display a "Sorry, your account has been
> disabled" error page if a user with u_state=disabled tries to log in.
>
> I looked at (and tried using) custom filters with CAP:Authentication, but
> something like the following isn't supported syntax-wise:
> CONSTRAINTS => { 'stateFilter:u_state' => "(created,active,restricted)"
> }
>
> Any suggestions?
I think you are right, Mark. I think you may need to write your own driver for
this.
You can copy the DBI driver and modify it, or write one from scratch, which has
the possibility of being simpler and less abstracted because it is designed
just for your case.
You could also ask Cees if he's interested in patch for "enum()" support in
CGI::Application::Plugin::Authentication.
Mark
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################