X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fregister%2Fregister.inc.php;h=a54b053548ae965c74a9502fd2e8dfe5a2d21827;hb=9483a7c7e923556fcafbe5154910dcc53a8e3d5a;hp=4506edd2ea9169d448bcebe36291049bb4f5bb91;hpb=94590511073104fbf5b565cf988e76182021ef47;p=platal.git diff --git a/modules/register/register.inc.php b/modules/register/register.inc.php index 4506edd..a54b053 100644 --- a/modules/register/register.inc.php +++ b/modules/register/register.inc.php @@ -32,24 +32,24 @@ function checkId(&$subState) new UFC_UID($subState->i('xorg_id')), new PFC_Not(new UFC_Dead()) )); - $user = $uf->getProfiles(); + $profile = $uf->getProfile(); - if ($user->__get('state') == 'active') { + if ($profile->__get('state') == 'active') { return "Tu es déjà inscrit ou ton matricule est incorrect !"; } - if ($user->promo() != $subState->s('promo')) { + if ($profile->promo() != $subState->s('promo')) { return 'Le matricule est incorrect.'; } - if (!$user->compareNames($subState->s('firstname'), $subState->s('lastname'))) { + if (!$profile->compareNames($subState->s('firstname'), $subState->s('lastname'))) { return "Erreur dans l'identification. Réessaie, il y a une erreur quelque part !"; } - $subState->set('lastname', $user->lastName()); - $subState->set('firstname', $user->firstName()); - $subState->set('uid', $user->id()); - $subState->set('watch', $user->watch()); - $subState->set('birthdateRef', $user->profile->__get('birthdate_ref')); + $subState->set('lastname', $profile->lastName()); + $subState->set('firstname', $profile->firstName()); + $subState->set('uid', $profile->owner()->id()); + $subState->set('watch', $profile->owner()->watch); + $subState->set('birthdateRef', $profile->__get('birthdate_ref')); return true; } @@ -69,7 +69,7 @@ function checkOldId(&$subState) $subState->set('lastname', $profile->lastName()); $subState->set('firstname', $profile->firstName()); $subState->set('uid', $profile->owner()->id()); - $subState->set('watch', $profile->owner()->watch()); + $subState->set('watch', $profile->owner()->watch); $subState->set('birthdateRef', $profile->__get('birthdate_ref')); $subState->set('xorgid', $profile->__get('xorg_id')); return true; @@ -85,7 +85,7 @@ function checkOldId(&$subState) while ($profile = $it->next()) { if ($profile->compareNames($subState->s('firstname'), $subState->s('lastname'))) { $subState->set('uid', $profile->owner()->id()); - $subState->set('watch', $profile->owner()->watch()); + $subState->set('watch', $profile->owner()->watch); $subState->set('birthdateRef', $profile->__get('birthdate_ref')); $subState->set('xorgid', $profile->__get('xorg_id')); return 'Tu es vraisemblablement déjà inscrit !'; @@ -198,10 +198,10 @@ function finishRegistration($subState) $mymail = new PlMailer('register/end.mail.tpl'); $mymail->assign('emailXorg', $subState->s('bestalias')); - $mymail->assign('lemail', $subState->s('email')); + $mymail->assign('to', $subState->s('email')); $mymail->assign('baseurl', $globals->baseurl); $mymail->assign('hash', $hash); - $mymail->assign('subj', $subState->s('bestalias') . '@' . $globals->mail->domain); + $mymail->assign('subject', $subState->s('bestalias') . '@' . $globals->mail->domain); $mymail->send(); }