Exemplo n.º 1
0
 public function newKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoord, $email)
 {
     $wachtwHashed = sha1($email . $wachtwoord);
     $klantDAO = new KlantDAO();
     $klant = $klantDAO->createKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwHashed, $email);
     if (isset($klant)) {
         return true;
     } else {
         return false;
     }
 }
 public function newKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoord, $email)
 {
     $checkLegeInput = $this->checkLeegInput($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoord, $email);
     if (is_null($checkLegeInput)) {
         throw new GeenLegeInputException();
     }
     $wachtwoordchecked = $this->checkWachtwoord($wachtwoord);
     if (is_null($wachtwoordchecked)) {
         throw new InvalidPasswordException();
     }
     $inValidEmail = $this->valEmail($email);
     if (is_null($inValidEmail)) {
         throw new NoValidEmailException();
     }
     $klantDao = new KlantDAO();
     $klantDao->createKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoord, $email);
 }
Exemplo n.º 3
0
 public function newKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoord, $email)
 {
     $wachtwoordHashed = sha1($email . $wachtwoord);
     $klantDao = new KlantDAO();
     $klantDao->createKlant($naam, $voornaam, $straat, $nr, $postcode, $gemeente, $wachtwoordHashed, $email);
 }