X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fregister%2Fregister.inc.php;h=f7a5c4ea7c3b47a5a259a20c25a5ed09499052c9;hb=1f58ccb1e75eca08fbd04971d617ea372bc77b5a;hp=2de153070a2b2569fbb63e1fdadc61c30c96b3d0;hpb=21c7c593d7100a887f984c49a82c03eb32169fc4;p=platal.git
diff --git a/modules/register/register.inc.php b/modules/register/register.inc.php
index 2de1530..f7a5c4e 100644
--- a/modules/register/register.inc.php
+++ b/modules/register/register.inc.php
@@ -1,6 +1,6 @@
next()) {
if (user_cmp($prenom, $nom, $_prenom, $_nom)) {
+ $nom = $_nom;
+ $prenom = $_prenom;
$ourid = $_uid;
$ourmat = $_mat;
return true;
@@ -152,10 +156,10 @@ function create_aliases (&$sub)
$mailorg = make_username($prenom, $nom);
$mailorg2 = $mailorg.sprintf(".%02u", ($promo%100));
- $res = XDB::query("SELECT hruid FROM auth_user_md5 WHERE user_id = {?}", $uid);
+ $res = XDB::query("SELECT hruid FROM auth_user_md5 WHERE user_id = {?} AND hruid != ''", $uid);
if ($res->numRows() == 0) {
return "Tu n'as pas d'adresse à vie pré-attribuée.
"
- . "Envoie un mail à mail->domain}\">" .
+ . "Envoie un mail à mail->domain}\">"
. "support@{$globals->mail->domain} en expliquant ta situation.";
} else {
// TODO: at the moment forlife == hruid, however we'll have to change