From: Florent Bruneau Date: Sun, 22 Aug 2010 16:03:43 +0000 (+0200) Subject: Fix misdetection of already registered users during registration process. X-Git-Tag: xorg/1.0.1~15^2~18 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f09bdd3d5aef5f01a916baa8c630f75ab8257de5;p=platal.git Fix misdetection of already registered users during registration process. (Close #1216) Signed-off-by: Florent Bruneau --- diff --git a/modules/register/register.inc.php b/modules/register/register.inc.php index 4da836b..b445502 100644 --- a/modules/register/register.inc.php +++ b/modules/register/register.inc.php @@ -30,13 +30,14 @@ function checkId(&$subState) $uf = new UserFilter(new PFC_And( new UFC_SchoolId('xorg', $subState->i('xorgid')), - new PFC_Not(new UFC_Dead()) + new PFC_Not(new UFC_Dead()), + new PFC_Not(new UFC_Registered(true)) )); $profile = $uf->getProfile(); - - if ($profile->__get('state') == 'active') { + if (is_null($profile)) { return "Tu es déjà inscrit ou ton matricule est incorrect !"; } + if ($profile->promo() != $subState->s('promo')) { return 'Le matricule est incorrect.'; }