Hi,

On Wed, Sep 14, 2005 at 12:08:57PM -0700, Ski Kacoroski wrote:
> 
> I am missing something and am hoping you can help.  I am using example 
> code from CGI::Application::Plugin::Session.  My code is at the end.  My 
> problem is that I display a login form, but when the user clicks ok, the 
> cgiapp_prerun runs and because the login has not been processed yet, 
> starts up a new session so I never get to another run mode (the login 
> form template sets rm to student_pw).  What is the trick I am missing?

[snip]

You need to check which run mode you are going to and let it pass if it
is the one that does the pw check.

> sub cgiapp_prerun {
>   my $self=shift;
>#   unless ($self->session->param('logged-in') eq 'y') {

  if( $self->session-param('logged-in') ne 'y' &&
      $self->get_current_runmode() ne 'student_pw' ) {

>     $self->prerun_mode('login');
>   }
> }

HTH, God bless
Roberto Ruiz


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to