Request-Modul für die Benutzerdaten II

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

lib/VShop/Request/Profile.pm
sub process {
   my ($self, $session) = @_;
   my $cgi = $session->cgi;

   my $login = $cgi->param('login');
   $self->{takeover} = 1; # default
   return undef unless defined $login && $login;

   my $msg = new VShop::Element::Text;

   my $customers = TBI->open("Customer");
   unless ($customers->exists($login)) {
      $msg->add("Invalid login.");
      return $msg;
   }

   my %customer = $customers->fetch($login);
   my $password1 = $cgi->param('password1');
   unless (defined $password1 &&
         $password1 eq $customer{'password'}) {
      $msg->add("Your password is incorrect. " .
         "Please try it again.");
      return $msg;
   }

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 1996 - 2003 Andreas Borchert, in HTML konvertiert am 01.10.2003