Merge branch 'master' of ssh://bastet/nemubot_askweb

This commit is contained in:
Némunaire 2012-06-19 19:14:28 +02:00
commit 59f59d2e88
3 changed files with 27 additions and 1 deletions

View File

@ -36,6 +36,9 @@
<label for="email">Votre email : </label> <label for="email">Votre email : </label>
<input id="email" name="email" type="text" /> <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"/> <input type="submit" name="send" value="Envoyer"/>
</form> </form>
</article> </article>

View File

@ -1,5 +1,12 @@
<?php <?php
include("User.class.php");
$email = $_POST['email'];
$login = $_POST['login'];
$user = User::new_User($email, $login);
function mail_utf8($to, $subject = '(No subject)', function mail_utf8($to, $subject = '(No subject)',
$message = '', $header = '') $message = '', $header = '')
{ {
@ -20,7 +27,8 @@ $message = "Bonjour,\n"
."pour confirmer :\n" ."pour confirmer :\n"
. "http://".$_SERVER["SERVER_NAME"] . "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" ."\n\n Si ce n'est pas le cas, merci de supprimer cet email\n"
."Cordialement,\n\n" ."Cordialement,\n\n"

View 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é !"
}
?>