Merge branch 'master' of ssh://bastet/nemubot_askweb
This commit is contained in:
commit
59f59d2e88
@ -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>
|
||||||
|
@ -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"
|
||||||
|
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