ad user -> Still in developpement
This commit is contained in:
parent
664dc99ece
commit
60cea68a0d
@ -7,6 +7,10 @@ $login = $_POST['login'];
|
||||
|
||||
$user = User::new_User($email, $login);
|
||||
|
||||
$userList = User::getUsers();
|
||||
$userList[] = $user;
|
||||
User::setUsers($userList);
|
||||
|
||||
function mail_utf8($to, $subject = '(No subject)',
|
||||
$message = '', $header = '')
|
||||
{
|
||||
@ -27,8 +31,8 @@ $message = "Bonjour,\n"
|
||||
."pour confirmer :\n"
|
||||
|
||||
. "http://".$_SERVER["SERVER_NAME"]
|
||||
. dirname($_SERVER["REQUEST_URI"]) . "/subscribeConfirmation.php?id="
|
||||
. $user->getId();
|
||||
. dirname($_SERVER["REQUEST_URI"]) . "/subscriptionConfirmation.php?id="
|
||||
. $user->getId()
|
||||
|
||||
."\n\n Si ce n'est pas le cas, merci de supprimer cet email\n"
|
||||
."Cordialement,\n\n"
|
||||
@ -36,7 +40,7 @@ $message = "Bonjour,\n"
|
||||
|
||||
if (mail_utf8($email, $subject, $message, $headers))
|
||||
{
|
||||
echo "email sent";
|
||||
echo "\nemail sent";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
include("User.class.php");
|
||||
|
||||
$user = User::getUser($_GET['id']);
|
||||
$id = $_GET['id'];
|
||||
echo "id = " . $id . "\n";
|
||||
|
||||
$user = User::getUser($id);
|
||||
|
||||
echo "Nom de l'utilisateur : " . $user->getEmail() . "\n";
|
||||
|
||||
if ($user == null)
|
||||
echo "Cet utilisateur n'existe pas"
|
||||
else
|
||||
{
|
||||
$user->set_validated(true);
|
||||
echo "Utilisateur confirmé !"
|
||||
}
|
||||
|
||||
?>
|
||||
|
16
thanksSubscription.php
Normal file
16
thanksSubscription.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php include("header.html") ?>
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Vous faites maintenant parti des utilisateurs valides !</h2>
|
||||
<p>
|
||||
Vous pouvez maintenant ajouter des questions à nemubot.<br/>
|
||||
<a href="./index.php">Ajouter une nouvelle question</a><br/>
|
||||
<a href="./list.php">Consulter la liste de questions déjà existantes</a>
|
||||
</p>
|
||||
<p>
|
||||
Nemubot vous remercie de l'aider à agrandir sa base de données.<br>
|
||||
</article>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user