Request-Modul für die Benutzerdaten III

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

lib/VShop/Request/Profile.pm
   my $password2 = $cgi->param('password2');
   if (defined $password2 &&
         $password2 && $password1 ne $password2) {
      $customer{password} = $password2;
   }

   my $name = $cgi->param('name');
   $customer{name} = $name if defined $name;

   my $email = $cgi->param('email');
   $customer{email} = $email if defined $email;

   my $address = $cgi->param('address');
   $customer{address} = $address if defined $address;

   $customers->modify($login, %customer);

   $self->{takeover} = 0;
   $msg->add("Your changes have been stored as requested.");
   return $msg;
}

sub nav {
   my ($self, $session) = @_;
   return undef unless defined $session->login;
   return new VShop::Element::Form($session, "Profile",
      button => "Edit Profile", scale => -1);
}

1;

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