throw new GebruikerBestaatException(); } /** * Check both passwords are identical to each other */ if ($userPassword !== $userPasswordRt) { throw new OngelijkeWachtwoordException(); } /** * Hash password */ $userPassword = $obj->hashPassword($userPassword); /** * Create new user */ $userRegistration = $obj->creerGebruiker($userVoornaam, $userFamilienaam, $userEmail, $userPassword, $userEmailHash); if (!isset($userRegistration)) { throw new RegistratieMisluktException(); } /** * Send verification email */ $obj->sendVerificationEmail($userVoornaam, $userEmail, $userEmailHash); echo md5(date('Y-m-d H:i:s')); } catch (RegistratieMisluktException $e) { /** * todo Foutmelding in een variabele steken */ echo "Registratie mislukt"; } catch (GebruikerBestaatException $e) { echo "Gebruiker bestaat al";