#13 and #18 finished and PreReleased launch

This commit is contained in:
José Luis Garrido Labrador
2018-10-21 20:48:35 +02:00
parent cb7a16984b
commit d1353bd1cf
15 changed files with 450 additions and 100 deletions

29
Source/src/domails.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
function newUser($email,$nick,$token){
global $app;
$header = 'From: CodeShare ' . "contacto@jkanetwork.com\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=UTF-8";
$to = $email;
$url = $app['url_generator']->generate('confirm',array('nick'=>$nick,'token'=>$token));
$correo = "<p>Wellcome to CodeShare $nick, the distribution platform for code fragments</p>
<p>To confirm your account please, click in the next link: <a href='https://codeshare.jkanetwork.com/$url'>https://codeshare.jkanetwork.com/$url</a></p>";
mail($to,"Confirm account to $nick",$correo,$header);
}
function restorePassword($email,$nick,$token,$timestamp){
global $app;
$header = 'From: CodeShare ' . "contacto@jkanetwork.com\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=UTF-8";
$to = $email;
$url = $app['url_generator']->generate('restorePass',array('nick'=>$nick,'token'=>$token,'timestamp' => $timestamp));
$correo = "<p>Someone requested that the password be reset for you</p>
<p>If this was a mistake, just ignore this email and nothing will happen.</p>
<p>To restore your password please, click in the next link: <a href='https://codeshare.jkanetwork.com/$url'>https://codeshare.jkanetwork.com/$url</a></p>";
mail($to,"Restore password to $nick",$correo,$header);
}