Index: /extensions/NBC_UserAdvManager/branches/2.11/admin/UserAdvManager_admin.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/admin/UserAdvManager_admin.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/admin/UserAdvManager_admin.php	(revision 3882)
@@ -384,5 +384,5 @@
   $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
 	
-  if (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2]=='true' and isset($conf_nbc_UserAdvManager_ConfirmMail[0]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true' )
+  if (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2]=='true' and isset($conf_nbc_UserAdvManager[3]) and $conf_nbc_UserAdvManager[3] <> '-1' and isset($conf_nbc_UserAdvManager_ConfirmMail[0]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true')
   {
 // +-----------------------------------------------------------------------+
Index: /extensions/NBC_UserAdvManager/branches/2.11/include/functions_UserAdvManager.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/include/functions_UserAdvManager.inc.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/include/functions_UserAdvManager.inc.php	(revision 3882)
@@ -635,5 +635,6 @@
   	WHERE u.'.$conf['user_fields']['id'].' >= 0
     	AND ug.group_id = "'.$conf_nbc_UserAdvManager[3].'"
-      AND TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'"
+      AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'"
+				OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'")
 		ORDER BY id ASC
 	;';
Index: /extensions/NBC_UserAdvManager/branches/2.11/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/language/en_UK/plugin.lang.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/language/en_UK/plugin.lang.php	(revision 3882)
@@ -108,5 +108,5 @@
 $lang['invalid_pwd'] = 'Invalid username or password !';
 $lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in tab "Global Configuration".';
-$lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab.';
+$lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab and an unvalidated users group is set in "Global Configuration" tab.';
 $lang['No_validation_for_Guest'] = 'The "Guest" account is not subject to validation';
 $lang['No_validation_for_default_user'] = 'The default account is not subject to validation';
Index: /extensions/NBC_UserAdvManager/branches/2.11/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/language/fr_FR/plugin.lang.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/language/fr_FR/plugin.lang.php	(revision 3882)
@@ -108,5 +108,5 @@
 $lang['invalid_pwd'] = 'Nom utilisateur ou Mot de passe invalide !';
 $lang['Err_ConfirmMail_Settings'] = 'Cette page n\'est accessible que si "Confirmation de l\'adresse email" est actif dans l\'onglet "Configuration Générale".';
-$lang['Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Délai de validation d\'inscription" est actif dans l\'onglet "Configuration de ConfirmMail".';
+$lang['Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Délai de validation d\'inscription" est actif dans l\'onglet "Configuration de ConfirmMail" et si un groupe de visiteurs non validés est configuré dans l\'onglet "Configuration Générale".';
 $lang['No_validation_for_Guest'] = 'Le compte Guest n\'est pas soumis à validation';
 $lang['No_validation_for_default_user'] = 'Le compte par défaut n\'est pas soumis à validation';
Index: /extensions/NBC_UserAdvManager/branches/2.11/main.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/main.inc.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/main.inc.php	(revision 3882)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: NBC UserAdvManager
-Version: 2.11.1
+Version: 2.11.2
 Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
@@ -55,4 +55,7 @@
 -- 2.11.1 : Bug fixed with install and upgrade functions
 						Language files correction
+
+-- 2.11.2 : Bug fixed on bad query for unvalidated users display in unvalidated users list
+						Bug fixed : Sql syntax error on plugin activation
 
 */
Index: /extensions/NBC_UserAdvManager/branches/2.11/maintain.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/branches/2.11/maintain.inc.php	(revision 3881)
+++ /extensions/NBC_UserAdvManager/branches/2.11/maintain.inc.php	(revision 3882)
@@ -18,19 +18,11 @@
   $q = '
     INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
-    VALUES ("nbc_UserAdvManager_ConfirmMail","true;5;Hello.
+    VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;Hello.
+		
+This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.
 
-This is a reminder message because you registered on our gallery but you do not validate your registration and your 
+Note: After this period, your account will be permanently deleted.;false;Hello.
 
-validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You 
-
-have again 5 days to validate your registration.
-
-Note: After this period, your account will be permanently deleted.;true;Hello.
-
-This is a reminder message because you registered on our gallery but you do not validate your registration and your 
-
-validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by 
-
-clicking on the link in the message you should have received when you registered.
+This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.
 
 Note: After this period, your account will be permanently deleted.","Parametres nbc_UserAdvManager - ConfirmMail")
@@ -57,9 +49,9 @@
 /* Check for upgrade */
 	  $query = '
-    SELECT *, COUNT (*)
+    SELECT *
 		FROM '.CONFIG_TABLE.'
     WHERE param = "nbc_UserAdvManager_ConfirmMail"
   ;';
-  list($count) = mysql_fetch_row(pwg_query($query)); 
+  $count = mysql_num_rows(pwg_query($query)); 
   
   /* upgrade from branch 2.10 */
@@ -84,4 +76,13 @@
   }
 
+  if (isset($conf['nbc_UserAdvManager_ConfirmMail']))
+  {
+    $q = '
+      DELETE FROM '.CONFIG_TABLE.'
+      WHERE param="nbc_UserAdvManager_ConfirmMail"
+    ;';
+
+    pwg_query($q);
+  }
 
   $q = 'DROP TABLE '.USER_CONFIRM_MAIL_TABLE.';';
@@ -95,19 +96,11 @@
   $q = '
     INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
-    VALUES ("nbc_UserAdvManager_ConfirmMail","true;5;Hello.
+    VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;Hello.
+		
+This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.
 
-This is a reminder message because you registered on our gallery but you do not validate your registration and your 
+Note: After this period, your account will be permanently deleted.;false;Hello.
 
-validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You 
-
-have again 5 days to validate your registration.
-
-Note: After this period, your account will be permanently deleted.;true;Hello.
-
-This is a reminder message because you registered on our gallery but you do not validate your registration and your 
-
-validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by 
-
-clicking on the link in the message you should have received when you registered.
+This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.
 
 Note: After this period, your account will be permanently deleted.","Parametres nbc_UserAdvManager - ConfirmMail")
