Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function newRegistration($firstname, $lastname, $email, $password, $gender) {
- $vkey = time().$firstname;
- $stmt = Kernel::getInstance()->getPdo()->prepare("INSERT INTO interns (firstname, lastname, email, password, gender, vkey) VALUES (?, ?, ?, ?, ?, ?)");
- $stmt->execute([$firstname, $lastname, $email, password_hash($password, PASSWORD_DEFAULT), $gender, $vkey]);
- $subject = "Adopte un stage - Validation de votre compte";
- $body = "Bonjour, $firstname.
- <br>Nous avons bien reçu votre demande d'inscription !
- <br>Afin de finaliser votre inscription, <a href='http://localhost:8888/Adopteunstage-main/public/interns/welcome&vkey={$vkey}'>cliquez ici</a> !";
- Kernel::getInstance()->sendEmail($email, $subject, $body);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement