# Check for username and password my $username = untaint_string($request->param("username")) || ""; my $password = untaint_string($request->param("password")) || ""; # Perform the login? my $page; if($username ne "") { # Log them in! my $check_user = user_login($username, $password); # Check login status if($username eq $check_user) { # Set session parameters $self->param("session")->param("is_logged_in", "Y"); # Where do we redirect upon success? my $redirect = $self->param("session")->param("login_redirect"); $redirect = $config{URL_BASE} unless($redirect ne ""); # Redirect! $self->header_type("redirect"); $self->header_props(-url => $redirect); return "Please wait. . ."; } elsif($username eq "INACTIVE") { $self->param("error", "This account is currently inactive."); $page = $self->login(); } else { $self->param("error", "Invalid user/password combination. Please enter a new username and password."); $page = $self->login(); } } else { $self->param("error", "Invalid user/password combination. Please enter a new username and password."); $page = $self->login(); } return $page;