From f09bdd3d5aef5f01a916baa8c630f75ab8257de5 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 22 Aug 2010 18:03:43 +0200 Subject: [PATCH] Fix misdetection of already registered users during registration process. (Close #1216) Signed-off-by: Florent Bruneau --- modules/register/register.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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.'; } -- 2.1.4