[cgiapp] CAP:Authentication with an enum credential

Mark Rajcok mrajcok at gmail.com
Tue Apr 14 01:06:38 EDT 2009


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?

-- Mark


More information about the cgiapp mailing list