Add a new user
This commit is contained in:
parent
63e14532f8
commit
664dc99ece
@ -36,6 +36,9 @@
|
||||
<label for="email">Votre email : </label>
|
||||
<input id="email" name="email" type="text" />
|
||||
|
||||
<label for="login">Login : </label>
|
||||
<input id="login" name="login" type="text" />
|
||||
|
||||
<input type="submit" name="send" value="Envoyer"/>
|
||||
</form>
|
||||
</article>
|
||||
|
@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
include("User.class.php");
|
||||
|
||||
$email = $_POST['email'];
|
||||
$login = $_POST['login'];
|
||||
|
||||
$user = User::new_User($email, $login);
|
||||
|
||||
function mail_utf8($to, $subject = '(No subject)',
|
||||
$message = '', $header = '')
|
||||
{
|
||||
@ -20,7 +27,8 @@ $message = "Bonjour,\n"
|
||||
."pour confirmer :\n"
|
||||
|
||||
. "http://".$_SERVER["SERVER_NAME"]
|
||||
. dirname($_SERVER["REQUEST_URI"]) . "subscribeConfirmation.php"
|
||||
. dirname($_SERVER["REQUEST_URI"]) . "/subscribeConfirmation.php?id="
|
||||
. $user->getId();
|
||||
|
||||
."\n\n Si ce n'est pas le cas, merci de supprimer cet email\n"
|
||||
."Cordialement,\n\n"
|
||||
|
15
subscriptionConfirmation.php
Normal file
15
subscriptionConfirmation.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
include("User.class.php");
|
||||
|
||||
$user = User::getUser($_GET['id']);
|
||||
|
||||
if ($user == null)
|
||||
echo "Cet utilisateur n'existe pas"
|
||||
else
|
||||
{
|
||||
$user->set_validated(true);
|
||||
echo "Utilisateur confirmé !"
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user