Index: extensions/NBC_UserAdvManager/trunk/ConfirmMail.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/ConfirmMail.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/ConfirmMail.php	(revision 3858)
@@ -12,17 +12,19 @@
 load_language('plugin.lang', NBC_UserAdvManager_PATH);
 
-if ( isset($_GET['key']) )
+if (isset($_GET['key']))
 {
 
-  if ( VerifyConfirmMail($_GET['key']) )
-    $template->assign(array(
-      'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_ok'),
-    ));
+  if (VerifyConfirmMail($_GET['key']))
+    $template->assign(
+			array(
+				'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_ok'),
+			)
+		);
   else  
-    $template->assign(array(
-      'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_bad'),
-    ));
-      
-    
+    $template->assign(
+			array(
+				'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_bad'),
+			)
+		);        
 //    redirect(make_index_url());
 }
@@ -49,12 +51,12 @@
 $template->set_filenames(
   array(
-    'confirm_mail'=>NBC_UserAdvManager_PATH.'ConfirmMail.tpl',
-    )
-  );
+  	'confirm_mail'=>NBC_UserAdvManager_PATH.'ConfirmMail.tpl',
+	)
+);
 if ( isset($lang['Theme: '.$user['theme']]) )
 {
   $template->assign(
-    'THEME_ABOUT',l10n('Theme: '.$user['theme'])
-    );
+  	'THEME_ABOUT',l10n('Theme: '.$user['theme'])
+  );
 }
 
@@ -62,10 +64,10 @@
 	{
 	$template->assign(
-  		array(
-    		'GALLERY_URL' =>
-         		 isset($page['gallery_url']) ?
-          		      $page['gallery_url'] : $conf['gallery_url'],
-       		 )
-    	 );
+		array(
+    	'GALLERY_URL' =>
+      		isset($page['gallery_url']) ?
+          		$page['gallery_url'] : $conf['gallery_url'],
+		)
+	);
 }
 
Index: extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php	(revision 3858)
@@ -48,7 +48,9 @@
 switch ($page['tab'])
 {
+// *************************************************************************
 // +-----------------------------------------------------------------------+
 // |                           Global Config                               |
 // +-----------------------------------------------------------------------+
+// *************************************************************************
   case 'global':
 	
@@ -135,4 +137,5 @@
 	    $No_Valid_Status = $status;
 	  }
+	  
 /* Template initialization for unvalidated users group */
       $template->assign(
@@ -144,4 +147,5 @@
 	  		);
   }
+  
 /* Get status values */
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
@@ -152,4 +156,5 @@
 		  $Valid_Status = $status;
 		}
+		
 /* Template initialization for unvalidated users group */
       $template->assign(
@@ -189,5 +194,5 @@
 
   if ( isset($_POST['audit']) or isset($_POST['submit']) )
-  {
+	{
 		$msg_error1 = '';
 		
@@ -217,60 +222,60 @@
 		
 /* Username without forbidden keys */
-      if ( isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' )
-	    {
-		  	$query = "
-		    	SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
-					FROM ".USERS_TABLE."
-				;";
+    if ( isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' )
+	  {
+			$query = "
+		  	SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
+				FROM ".USERS_TABLE."
+			;";
 			  
-			  $result = pwg_query($query);
+			$result = pwg_query($query);
 			
-			  while($row = mysql_fetch_array($result))
+			while($row = mysql_fetch_array($result))
+			{
+				if (!ValidateUsername($row['username']))
+					$msg_error2 .= (($msg_error2 <> '') ? '<br/>' : '') . l10n('Err_audit_username_char').$row['username'];
+			}
+		}
+
+		$msg_error3 = '';
+		
+/* Email without forbidden domain */
+    if ( isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' )
+	  {
+			$query = "
+		  	SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
+				FROM ".USERS_TABLE."
+			;";
+			  
+		  $result = pwg_query($query);
+			
+		  while($row = mysql_fetch_array($result))
+		  {
+				$conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+			  $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
+			  for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
 			  {
-					if (!ValidateUsername($row['username']))
-				    $msg_error2 .= (($msg_error2 <> '') ? '<br/>' : '') . l10n('Err_audit_username_char').$row['username'];
-				}
-			}
-
-		$msg_error3 = '';
-		
-/* Email without forbidden domain */
-      if ( isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' )
-	    {
-		  	$query = "
-		    	SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
-					FROM ".USERS_TABLE."
-				;";
-			  
-		  	$result = pwg_query($query);
-			
-		  	while($row = mysql_fetch_array($result))
-		    {
-			  	$conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
-			  	$conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
-			  	for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
-			    {
-						$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
-				  	if (preg_match($pattern, $row['mail_address']))
-				    {
-					  	$msg_error3 .=  (($msg_error3 <> '') ? '<br/>' : '') . l10n('Err_audit_email_forbidden').$row['username'].' ('.$row['mail_address'].')';
-						}
+					$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
+				  if (preg_match($pattern, $row['mail_address']))
+				  {
+						$msg_error3 .=  (($msg_error3 <> '') ? '<br/>' : '') . l10n('Err_audit_email_forbidden').$row['username'].' ('.$row['mail_address'].')';
 					}
 				}
 			}
-		
-      if ($msg_error1 <> '')
-		    $errors[] = $msg_error1.'<br/><br/>';
-		
-      if ($msg_error2 <> '')
-		    $errors[] = $msg_error2.'<br/><br/>';
-		
-	  	if ($msg_error3 <> '')
-	    	$errors[] = $msg_error3.'<br/><br/>';
-		
-	  	if ($msg_error1 <> '' or $msg_error2 <> '' or $msg_error3 <> '')
-	    	array_push($page['errors'], l10n('Err_audit_advise'));
-	  	else
-        array_push($page['infos'], l10n('UserAdvManager_audit_ok'));
+		}
+		
+    if ($msg_error1 <> '')
+			$errors[] = $msg_error1.'<br/><br/>';
+		
+		if ($msg_error2 <> '')
+			$errors[] = $msg_error2.'<br/><br/>';
+		
+		if ($msg_error3 <> '')
+	  	$errors[] = $msg_error3.'<br/><br/>';
+		
+		if ($msg_error1 <> '' or $msg_error2 <> '' or $msg_error3 <> '')
+	  	array_push($page['errors'], l10n('Err_audit_advise'));
+		else
+    	array_push($page['infos'], l10n('UserAdvManager_audit_ok'));
 	}
 
@@ -296,7 +301,9 @@
   break;
 
+// *************************************************************************
 // +-----------------------------------------------------------------------+
 // |                           ConfirmMail Config                          |
 // +-----------------------------------------------------------------------+
+// *************************************************************************
   case 'confirmmail':
 	
@@ -345,12 +352,12 @@
 // |                             errors display                            |
 // +-----------------------------------------------------------------------+
-	if ( isset ($errors) and count($errors) != 0)
-	{
-	  $template->assign('errors',array());
-		foreach ($errors as $error)
-	  {
-			array_push($page['errors'], $error);
-	  }
- 	}  
+		if ( isset ($errors) and count($errors) != 0)
+		{
+	  	$template->assign('errors',array());
+			foreach ($errors as $error)
+	  	{
+				array_push($page['errors'], $error);
+	  	}
+ 		}  
 
 // +-----------------------------------------------------------------------+
@@ -367,8 +374,11 @@
 
 
+// *************************************************************************
 // +-----------------------------------------------------------------------+
 // |                           Users manager page                          |
 // +-----------------------------------------------------------------------+
+// *************************************************************************
   case 'usermanager':
+  
   $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
   $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
@@ -380,5 +390,5 @@
 // +-----------------------------------------------------------------------+
 
-	if (!defined('PHPWG_ROOT_PATH'))
+		if (!defined('PHPWG_ROOT_PATH'))
     {
     	die('Hacking attempt!');
@@ -390,5 +400,5 @@
 // | Check Access and exit when user status is not ok                      |
 // +-----------------------------------------------------------------------+
-	check_status(ACCESS_ADMINISTRATOR);
+		check_status(ACCESS_ADMINISTRATOR);
 
     $page['order_by_items'] = array(
@@ -403,259 +413,338 @@
 // +-----------------------------------------------------------------------+
 
-	$page['filtered_users'] = get_unvalid_user_list();
+		$page['filtered_users'] = get_unvalid_user_list();
 
 // +-----------------------------------------------------------------------+
 // |                            selected users                             |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Del_Selected']))
-	{
-  	$collection = array();
-
-		switch ($_POST['target'])
-    {
-    	case 'all' :
-      {
-      	foreach($page['filtered_users'] as $local_user)
-        {
-        	array_push($collection, $local_user['id']);
-        }
-        break;
-			}
-      case 'selection' :
-      {
-      	if (isset($_POST['selection']))
-        {
-        	$collection = $_POST['selection'];
-        }
-        break;
-      }
-		}
-
-    if (count($collection) == 0)
-    {
-    	array_push($page['errors'], l10n('Select at least one user'));
-    }
-	}
+		if (isset($_POST['Del_Selected']))
+		{
+  		$collection = array();
+
+			switch ($_POST['target'])
+    	{
+    		case 'all' :
+      	{
+      		foreach($page['filtered_users'] as $local_user)
+        	{
+        		array_push($collection, $local_user['id']);
+        	}
+					break;
+				}
+      	case 'selection' :
+      	{
+      		if (isset($_POST['selection']))
+        	{
+        		$collection = $_POST['selection'];
+        	}
+        	break;
+      	}
+			}
+
+			if (count($collection) == 0)
+    	{
+    		array_push($page['errors'], l10n('Select at least one user'));
+   		}
+		}
 
 // +-----------------------------------------------------------------------+
 // |                             delete users                              |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Del_Selected']) and count($collection) > 0)
-  {
-  	if (in_array($conf['guest_id'], $collection))
-   	{
-    	array_push($page['errors'], l10n('Guest cannot be deleted'));
-    }
-    if (($conf['guest_id'] != $conf['default_user_id']) and
-    	in_array($conf['default_user_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('Default user cannot be deleted'));
-    }
-    if (in_array($conf['webmaster_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('Webmaster cannot be deleted'));
-    }
-    if (in_array($user['id'], $collection))
-    {
-    	array_push($page['errors'], l10n('You cannot delete your account'));
-    }
-
-    if (count($page['errors']) == 0)
-    {
-    	foreach ($collection as $user_id)
-      {
-      	delete_user($user_id);
-      }
-     	array_push(
-      	$page['infos'],
-        l10n_dec(
-        '%d user deleted', '%d users deleted',
-        count($collection)
-        )
-      );
-
-      foreach ($page['filtered_users'] as $filter_key => $filter_user)
-      {
-      	if (in_array($filter_user['id'], $collection))
-        {
-        	unset($page['filtered_users'][$filter_key]);
-        }
-      }
-		}
-	}
-
+		if (isset($_POST['Del_Selected']) and count($collection) > 0)
+  	{
+  		if (in_array($conf['guest_id'], $collection))
+   		{
+    		array_push($page['errors'], l10n('Guest cannot be deleted'));
+    	}
+    	if (($conf['guest_id'] != $conf['default_user_id']) and
+    		in_array($conf['default_user_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('Default user cannot be deleted'));
+    	}
+    	if (in_array($conf['webmaster_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('Webmaster cannot be deleted'));
+    	}
+    	if (in_array($user['id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('You cannot delete your account'));
+    	}
+
+			if (count($page['errors']) == 0)
+    	{
+    		foreach ($collection as $user_id)
+      	{
+      		delete_user($user_id);
+      	}
+     		array_push(
+      		$page['infos'],
+        	l10n_dec(
+        	'%d user deleted', '%d users deleted',
+        	count($collection)
+        	)
+      	);
+
+      	foreach ($page['filtered_users'] as $filter_key => $filter_user)
+      	{
+      		if (in_array($filter_user['id'], $collection))
+        	{
+        		unset($page['filtered_users'][$filter_key]);
+        	}
+     		}
+			}
+		}
+
+// +-----------------------------------------------------------------------+
+// |                 Resend new validation key to users                    |
+// +-----------------------------------------------------------------------+
 // +-----------------------------------------------------------------------+
 // |                            selected users                             |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Mail_With_Key']))
-	{
-  	$collection = array();
-
-		switch ($_POST['target'])
-    {
-    	case 'all' :
-      {
-      	foreach($page['filtered_users'] as $local_user)
-        {
-        	array_push($collection, $local_user['id']);
-        }
-        break;
-			}
-      case 'selection' :
-      {
-      	if (isset($_POST['selection']))
-        {
-        	$collection = $_POST['selection'];
-        }
-        break;
-      }
-		}
-
-    if (count($collection) == 0)
-    {
-    	array_push($page['errors'], l10n('Select at least one user'));
-    }
-	}
+		if (isset($_POST['Mail_With_Key']))
+		{
+  		$collection = array();
+
+			switch ($_POST['target'])
+    	{
+    		case 'all' :
+      	{
+      		foreach($page['filtered_users'] as $local_user)
+        	{
+        		array_push($collection, $local_user['id']);
+        	}
+        	break;
+				}
+      	case 'selection' :
+      	{
+      		if (isset($_POST['selection']))
+        	{
+        		$collection = $_POST['selection'];
+        	}
+        	break;
+      	}
+			}
+
+    	if (count($collection) == 0)
+    	{
+    		array_push($page['errors'], l10n('Select at least one user'));
+    	}
+		}
 // +-----------------------------------------------------------------------+
 // |                 Resend new validation key to users                    |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Mail_With_Key']) and count($collection) > 0)
-	{
-		if (in_array($conf['guest_id'], $collection))
-   	{
-    	array_push($page['errors'], l10n('No_validation_for_Guest'));
-    }
-    if (($conf['guest_id'] != $conf['default_user_id']) and
-    	in_array($conf['default_user_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_default_user'));
-    }
-   	if (in_array($conf['webmaster_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_Webmaster'));
-    }
-    if (in_array($user['id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_your_account'));
-    }
-
-    if (count($page['errors']) == 0)
-    {
-    	foreach ($collection as $user_id)
-      {     	
-      	$typemail = 1;
-				    $query = "
-							SELECT id, username, mail_address
-							FROM ".USERS_TABLE."
-							WHERE id = '".$user_id."'
+		if (isset($_POST['Mail_With_Key']) and count($collection) > 0)
+		{
+			if (in_array($conf['guest_id'], $collection))
+   		{
+    		array_push($page['errors'], l10n('No_validation_for_Guest'));
+    	}
+    	if (($conf['guest_id'] != $conf['default_user_id']) and
+    		in_array($conf['default_user_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_default_user'));
+    	}
+   		if (in_array($conf['webmaster_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_Webmaster'));
+    	}
+    	if (in_array($user['id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_your_account'));
+    	}
+
+    	if (count($page['errors']) == 0)
+    	{
+    		foreach ($collection as $user_id)
+      	{     	
+      		$typemail = 1;
+				  $query = "
+						SELECT id, username, mail_address
+						FROM ".USERS_TABLE."
+						WHERE id = '".$user_id."'
 						;";
-				$data = mysql_fetch_array(pwg_query($query));
+					$data = mysql_fetch_array(pwg_query($query));
 				
-      	ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],true);
-      }
-      array_push(
-      	$page['infos'],
-        l10n_dec(
-        '%d_Mail_With_Key', '%d_Mails_With_Key',
-        count($collection)
-        )
-      );
-
-      foreach ($page['filtered_users'] as $filter_key => $filter_user)
-      {
-      	if (in_array($filter_user['id'], $collection))
-        {
-        	unset($page['filtered_users'][$filter_key]);
-        }
-			}
-		}
-	}
-
+      		ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],true);
+      	}
+      	array_push(
+      		$page['infos'],
+        	l10n_dec(
+        		'%d_Mail_With_Key', '%d_Mails_With_Key',
+        	count($collection)
+        	)
+      	);
+      	
+				$page['filtered_users'] = get_unvalid_user_list();
+			}
+		}
+
+// +-----------------------------------------------------------------------+
+// |             Send reminder without new key to users                    |
+// +-----------------------------------------------------------------------+
 // +-----------------------------------------------------------------------+
 // |                            selected users                             |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Mail_Without_Key']))
-	{
-  	$collection = array();
-
-		switch ($_POST['target'])
-    {
-    	case 'all' :
-      {
-      	foreach($page['filtered_users'] as $local_user)
-        {
-        	array_push($collection, $local_user['id']);
-        }
-        break;
-			}
-      case 'selection' :
-      {
-      	if (isset($_POST['selection']))
-        {
-        	$collection = $_POST['selection'];
-        }
-        break;
-      }
-		}
-
-    if (count($collection) == 0)
-    {
-    	array_push($page['errors'], l10n('Select at least one user'));
-    }
-	}
+		if (isset($_POST['Mail_Without_Key']))
+		{
+  		$collection = array();
+
+			switch ($_POST['target'])
+    	{
+    		case 'all' :
+      	{
+      		foreach($page['filtered_users'] as $local_user)
+        	{
+        		array_push($collection, $local_user['id']);
+        	}
+        	break;
+				}
+      	case 'selection' :
+      	{
+      		if (isset($_POST['selection']))
+        	{
+        		$collection = $_POST['selection'];
+        	}
+        	break;
+      	}
+			}
+
+    	if (count($collection) == 0)
+    	{
+    		array_push($page['errors'], l10n('Select at least one user'));
+    	}
+		}
 // +-----------------------------------------------------------------------+
 // |             Send reminder without new key to users                    |
 // +-----------------------------------------------------------------------+
-	if (isset($_POST['Mail_Without_Key']) and count($collection) > 0)
-	{
-		if (in_array($conf['guest_id'], $collection))
-   	{
-    	array_push($page['errors'], l10n('No_validation_for_Guest'));
-    }
-    if (($conf['guest_id'] != $conf['default_user_id']) and
-    	in_array($conf['default_user_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_default_user'));
-    }
-   	if (in_array($conf['webmaster_id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_Webmaster'));
-    }
-    if (in_array($user['id'], $collection))
-    {
-    	array_push($page['errors'], l10n('No_validation_for_your_account'));
-    }
-
-    if (count($page['errors']) == 0)
-    {
-    	foreach ($collection as $user_id)
-      {
-      	$typemail = 2;
-				    $query = "
-							SELECT id, username, mail_address
-							FROM ".USERS_TABLE."
-							WHERE id = '".$user_id."'
-						;";
-				$data = mysql_fetch_array(pwg_query($query));
+		if (isset($_POST['Mail_Without_Key']) and count($collection) > 0)
+		{
+			if (in_array($conf['guest_id'], $collection))
+   		{
+    		array_push($page['errors'], l10n('No_validation_for_Guest'));
+    	}
+    	if (($conf['guest_id'] != $conf['default_user_id']) and
+    		in_array($conf['default_user_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_default_user'));
+    	}
+   		if (in_array($conf['webmaster_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_Webmaster'));
+    	}
+    	if (in_array($user['id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_your_account'));
+    	}
+
+    	if (count($page['errors']) == 0)
+    	{
+    		foreach ($collection as $user_id)
+      	{
+      		$typemail = 2;
+				  $query = "
+						SELECT id, username, mail_address
+						FROM ".USERS_TABLE."
+						WHERE id = '".$user_id."'
+					;";
+					
+					$data = mysql_fetch_array(pwg_query($query));
 				
-      	ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],false);				
-      }
-      array_push(
-      	$page['infos'],
-        l10n_dec(
-        '%d_Reminder_Sent', '%d_Reminders_Sent',
-        count($collection)
-        )
-      );
-
-      foreach ($page['filtered_users'] as $filter_key => $filter_user)
-      {
-      	if (in_array($filter_user['id'], $collection))
-        {
-        	unset($page['filtered_users'][$filter_key]);
-        }
-			}
-		}
-	}
+      		ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],false);				
+      	}
+      	array_push(
+      		$page['infos'],
+        	l10n_dec(
+        		'%d_Reminder_Sent', '%d_Reminders_Sent',
+       		count($collection)
+        	)
+      	);
+      	
+				$page['filtered_users'] = get_unvalid_user_list();
+			}
+		}
+
+// +-----------------------------------------------------------------------+
+// |             								Force validation					                 |
+// +-----------------------------------------------------------------------+
+// +-----------------------------------------------------------------------+
+// |                            selected users                             |
+// +-----------------------------------------------------------------------+
+		if (isset($_POST['Force_Validation']))
+		{
+  		$collection = array();
+
+			switch ($_POST['target'])
+    	{
+    		case 'all' :
+      	{
+      		foreach($page['filtered_users'] as $local_user)
+        	{
+        		array_push($collection, $local_user['id']);
+        	}
+        	break;
+				}
+      	case 'selection' :
+      	{
+      		if (isset($_POST['selection']))
+        	{
+        		$collection = $_POST['selection'];
+        	}
+        	break;
+      	}
+			}
+
+    	if (count($collection) == 0)
+    	{
+    		array_push($page['errors'], l10n('Select at least one user'));
+    	}
+		}
+// +-----------------------------------------------------------------------+
+// |             								Force validation					                 |
+// +-----------------------------------------------------------------------+
+		if (isset($_POST['Force_Validation']) and count($collection) > 0)
+		{
+			if (in_array($conf['guest_id'], $collection))
+   		{
+    		array_push($page['errors'], l10n('No_validation_for_Guest'));
+    	}
+    	if (($conf['guest_id'] != $conf['default_user_id']) and
+    		in_array($conf['default_user_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_default_user'));
+    	}
+   		if (in_array($conf['webmaster_id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_Webmaster'));
+    	}
+    	if (in_array($user['id'], $collection))
+    	{
+    		array_push($page['errors'], l10n('No_validation_for_your_account'));
+    	}
+
+    	if (count($page['errors']) == 0)
+    	{
+    		foreach ($collection as $user_id)
+      	{
+				  $query = "
+						SELECT id, username, mail_address
+						FROM ".USERS_TABLE."
+						WHERE id = '".$user_id."'
+					;";
+					
+					$data = mysql_fetch_array(pwg_query($query));
+				
+      		ForceValidation($data['id']);				
+      	}
+      	array_push(
+      		$page['infos'],
+        	l10n_dec(
+        		'%d_Validated_User', '%d_Validated_Users',
+       		count($collection)
+        	)
+      	);
+
+				$page['filtered_users'] = get_unvalid_user_list();
+			}
+		}
 
 // +-----------------------------------------------------------------------+
@@ -663,5 +752,5 @@
 // +-----------------------------------------------------------------------+
 
-	$groups[-1] = '------------';
+		$groups[-1] = '------------';
 
     $query = '
@@ -671,5 +760,5 @@
       ;';
 
-	$result = pwg_query($query);
+		$result = pwg_query($query);
           
     while ($row = mysql_fetch_array($result))
@@ -681,5 +770,5 @@
 // |                           Template Init                               |
 // +-----------------------------------------------------------------------+
-	$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
+		$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
 
     if (isset($_GET['start']) and is_numeric($_GET['start']))
@@ -701,8 +790,8 @@
 
 /* Hide radio-button if not allow to assign adviser */
-	if ($conf['allow_adviser'])
-    {
-      $template->assign('adviser', true);
-    }
+		if ($conf['allow_adviser'])
+    	{
+      	$template->assign('adviser', true);
+    	}
 	
 // +-----------------------------------------------------------------------+
@@ -710,6 +799,6 @@
 // +-----------------------------------------------------------------------+
 
-	$profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
-    $perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
+		$profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
+		$perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
 
     $visible_user_list = array();
@@ -717,5 +806,5 @@
     {
 /* simulate LIMIT $start, $conf['users_page'] */
-      if ($num < $start)
+			if ($num < $start)
       {
         continue;
@@ -727,7 +816,7 @@
 
       $visible_user_list[] = $local_user;
-	}
-
-	foreach ($visible_user_list as $local_user)
+		}
+
+		foreach ($visible_user_list as $local_user)
     {
       $groups_string = preg_replace(
@@ -738,79 +827,74 @@
             $local_user['groups']
          )
-        );
-
-	  if (isset($_POST['pref_submit'])
-        and isset($_POST['selection'])
-        and in_array($local_user['id'], $_POST['selection']))
-	  {
-      	$checked = 'checked="checked"';
-	  }
-      else
-      {
-        $checked = '';
-      }
-
-      $properties = array();
-      if ( $local_user['level'] != 0 )
-      {
-        $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
-      }
-      $properties[] =
-        (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
-          ? l10n('is_high_enabled') : l10n('is_high_disabled');
+			);
+
+	  	if (isset($_POST['pref_submit'])
+    		and isset($_POST['selection'])
+      	and in_array($local_user['id'], $_POST['selection']))
+	  	{
+				$checked = 'checked="checked"';
+	  	}
+			else
+    	{
+    		$checked = '';
+    	}
+
+    	$properties = array();
+    	if ( $local_user['level'] != 0 )
+			{
+    		$properties[] = l10n( sprintf('Level %d', $local_user['level']) );
+			}
+    	$properties[] =
+    		(isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
+      		? l10n('is_high_enabled') : l10n('is_high_disabled');
               
-      if (isset($conf_nbc_UserAdvManager_ConfirmMail[1]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true' )
-      {
-        $template->append(
-        	'users',
-              array(
-                'ID' => $local_user['id'],
-                'CHECKED' => $checked,
-                'U_PROFILE' => $profile_url.$local_user['id'],
-                'U_PERM' => $perm_url.$local_user['id'],
-                'USERNAME' => $local_user['username']
-                  .($local_user['id'] == $conf['guest_id']
-                    ? '<BR />['.l10n('is_the_guest').']' : '')
-                  .($local_user['id'] == $conf['default_user_id']
-                    ? '<BR />['.l10n('is_the_default').']' : ''),
-                'STATUS' => l10n('user_status_'.
-                  $local_user['status']).(($local_user['adviser'] == 'true')
-                    ? '<BR />['.l10n('adviser').']' : ''),
-                'EMAIL' => get_email_address_as_display_text($local_user['email']),
-                'GROUPS' => $groups_string,
-                'REGISTRATION' => $local_user['registration_date'],
-                )
-              );
-        }
-	  }
-
-
-
-
+			if (isset($conf_nbc_UserAdvManager_ConfirmMail[1]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true' )
+    	{
+    		$template->append(
+      		'users',
+        	array(
+        		'ID' => $local_user['id'],
+          	'CHECKED' => $checked,
+          	'U_PROFILE' => $profile_url.$local_user['id'],
+          	'U_PERM' => $perm_url.$local_user['id'],
+          	'USERNAME' => $local_user['username']
+							.($local_user['id'] == $conf['guest_id']
+							? '<BR />['.l10n('is_the_guest').']' : '')
+            	.($local_user['id'] == $conf['default_user_id']
+            	? '<BR />['.l10n('is_the_default').']' : ''),
+						'STATUS' => l10n('user_status_'.
+							$local_user['status']).(($local_user['adviser'] == 'true')
+            	? '<BR />['.l10n('adviser').']' : ''),
+						'EMAIL' => get_email_address_as_display_text($local_user['email']),
+          	'GROUPS' => $groups_string,
+          	'REGISTRATION' => $local_user['registration_date'],
+					)
+				);
+			}
+		}
 
 // +-----------------------------------------------------------------------+
 // |                             errors display                            |
 // +-----------------------------------------------------------------------+
-	if ( isset ($errors) and count($errors) != 0)
-	{
-	  $template->assign('errors',array());
-      foreach ($errors as $error)
-	  {
-		array_push($page['errors'], $error);
-	  }
- 	}  
+		if ( isset ($errors) and count($errors) != 0)
+		{
+	  	$template->assign('errors',array());
+			foreach ($errors as $error)
+	  	{
+				array_push($page['errors'], $error);
+	  	}
+		}  
 
 // +-----------------------------------------------------------------------+
 // |                           templates display                           |
 // +-----------------------------------------------------------------------+
-	$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/usermanager.tpl');
+		$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/usermanager.tpl');
     $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
-  }
+	}
   else
   {
-	array_push($page['infos'], l10n('Err_UserManager_Settings'));
+		array_push($page['infos'], l10n('Err_UserManager_Settings'));
   }
   break; 
- 
 }
 ?>
Index: extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl
===================================================================
--- extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl	(revision 3858)
@@ -15,10 +15,4 @@
       <br>
 		</li>
-		<!-- This function can't be set due to no access to server's cron functionnalities -->
-		<!-- <li><label>{'UserAdvManager_ConfirmMail_AutoDel'|@translate}</label><br>
-        <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_AUTODEL_TRUE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_true'|@translate}<br>
-        <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_AUTODEL_FALSE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_false'|@translate}<br>
-      <br>
-	    </li>-->
     <li><label>{'UserAdvManager_ConfirmMail_Remail'|@translate}</label><br>
     	<input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_REMAIL_TRUE} name="UserAdvManager_ConfirmMail_Remail"/> {'UserAdvManager_ConfirmMail_Remail_true'|@translate}<br>
Index: extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl
===================================================================
--- extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl	(revision 3858)
@@ -29,9 +29,8 @@
     			<td>{$user.EMAIL}</td>
     			<td>{$user.GROUPS}</td>
-
+					<td style="text-align:center;">{$user.REGISTRATION}</td>
     			{foreach from=$user.plugin_columns item=data}
     			<td>{$data}</td>
-    			{/foreach}
-    			<td style="text-align:center;">{$user.REGISTRATION}</td>
+    			{/foreach}    			
   			</tr>
   		{/foreach}
@@ -52,7 +51,4 @@
   <input class="submit" type="submit" value="{'Mail_with_key'|@translate}" name="Mail_With_Key" />
   <input class="submit" type="submit" value="{'Force_Validation'|@translate}" name="Force_Validation" />
-  <!--
-<input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} />
--->
 </p>
   </fieldset>
Index: extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 3858)
@@ -3,4 +3,5 @@
 load_language('plugin.lang', NBC_UserAdvManager_PATH);
 
+/* Function called from main.inc.php to send validation email */
 function SendMail2User($typemail, $id, $username, $password, $email, $confirm)
 {
@@ -72,21 +73,22 @@
 /* debugging              */
 /* ********************** */  
-  MailLog($email,$subject);
+//  MailLog($email,$subject);
 /* ********************** */
-
-}
+}
+
 
 /* Email sending debugger function */
-function MailLog  ($to, $subject)
-{
-   $fo=fopen (NBC_UserAdvManager_PATH.'admin/maillog.txt','a') ;
-   fwrite($fo,"======================\n") ;
-   fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n");
-   fwrite($fo,$to . "\n" . $subject . "\r\n") ;
-   fclose($fo) ;
+//function MailLog  ($to, $subject)
+//{
+//   $fo=fopen (NBC_UserAdvManager_PATH.'admin/maillog.txt','a') ;
+//   fwrite($fo,"======================\n") ;
+//   fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n");
+//   fwrite($fo,$to . "\n" . $subject . "\r\n") ;
+//   fclose($fo) ;
    //return mail ($to,$subject) ;
-}
-
-
+//}
+
+
+/* Function called from UserAdvManager_admin.php to resend validation email with or without new validation key */
 function ResendMail2User($typemail, $user_id, $username, $email, $confirm)
 {
@@ -137,10 +139,10 @@
 /* debugging              */
 /* ********************** */  
-  MailLog($email,$subject);
+//  MailLog($email,$subject);
 /* ********************** */
-
-}
-
-
+}
+
+
+/* Function called from functions AddConfirmMail and ResetConfirmMail for validation key generation */
 function FindAvailableConfirmMailID()
 {
@@ -161,5 +163,5 @@
 
 
-
+/* Function called from functions SendMail2User to process unvalidated users and generate validation key link */
 function AddConfirmMail($user_id, $email)
 {
@@ -170,5 +172,5 @@
   list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
   
-  if ( isset($Confirm_Mail_ID) )
+  if (isset($Confirm_Mail_ID))
   {
     $query = "
@@ -192,5 +194,5 @@
       AND (
         group_id = '".$conf_nbc_UserAdvManager[3]."'
-        OR 
+			OR 
         group_id = '".$conf_nbc_UserAdvManager[4]."'
       )
@@ -198,5 +200,5 @@
     pwg_query($query);
 
-    if ( !is_admin() and $conf_nbc_UserAdvManager[9] <> -1 )
+    if (!is_admin() and $conf_nbc_UserAdvManager[9] <> -1)
     {
       $query = "
@@ -224,4 +226,5 @@
 
 
+/* Function called from UserAdvManager_admin.php to reset validation key */
 function ResetConfirmMail($user_id)
 {
@@ -232,5 +235,5 @@
   list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
   
-  if ( isset($Confirm_Mail_ID) )
+  if (isset($Confirm_Mail_ID))
   { 
     $query = "
@@ -253,4 +256,5 @@
 
 
+/* Function called from main.inc.php - Triggered on user deletion */
 function DeleteConfirmMail($user_id)
 {
@@ -263,5 +267,5 @@
 
 
-
+/* Function called from ConfirmMail.php to verify validation key used by user according time limit */
 function VerifyConfirmMail($id)
 {
@@ -302,91 +306,176 @@
       if (!empty($registration_date))
       {
-		// Verify Confirmmail with time limit ON
-		if (isset ($conf_nbc_UserAdvManager_ConfirmMail[1]))
-		{
-			// dates formating and compare
-			$today = date("d-m-Y"); // Get today's date
-			list($day, $month, $year) = explode('-', $today); // explode date of today						 
-	  		$daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
+				// Verify Confirmmail with time limit ON
+				if (isset ($conf_nbc_UserAdvManager_ConfirmMail[1]))
+				{
+					// dates formating and compare
+					$today = date("d-m-Y"); // Get today's date
+					list($day, $month, $year) = explode('-', $today); // explode date of today						 
+ 					$daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
 	  		
-	  		list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
-			list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
-			$regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
+	  			list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
+					list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
+					$regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
 			
-			$deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps	
-			$deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
-
-			// Condition with the value set for time limit
-			if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the set limit
-			{
-				list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-
-				$query = '
-					UPDATE '.USER_CONFIRM_MAIL_TABLE.'
-					SET date_check="'.$dbnow.'"
-					WHERE id = "'.$id.'"
+					$deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps	
+					$deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
+
+					// Condition with the value set for time limit
+					if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the limit set
+					{
+						list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+						$query = '
+							UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+							SET date_check="'.$dbnow.'"
+							WHERE id = "'.$id.'"
+						;';
+						pwg_query($query);
+      
+						if ($conf_nbc_UserAdvManager[3] <> -1)
+						{
+							$query = "
+								DELETE FROM ".USER_GROUP_TABLE."
+								WHERE user_id = '".$data['user_id']."'
+								AND group_id = '".$conf_nbc_UserAdvManager[3]."'
+							;";
+							pwg_query($query);
+						}
+	    
+						if ($conf_nbc_UserAdvManager[4] <> -1) // Change user's group 
+						{
+							$query = "
+								DELETE FROM ".USER_GROUP_TABLE."
+								WHERE user_id = '".$data['user_id']."'
+								AND group_id = '".$conf_nbc_UserAdvManager[4]."'
+							;";
+							pwg_query($query);
+	
+							$query = "
+								INSERT INTO ".USER_GROUP_TABLE."
+									(user_id, group_id)
+								VALUES
+									('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
+								;";
+							pwg_query($query);
+						}
+
+						if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) // Change user's status
+						{
+							$query = "
+								UPDATE ".USER_INFOS_TABLE."
+								SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
+								WHERE user_id = '".$data['user_id']."'
+							;";
+							pwg_query($query);
+						}
+						// Refresh user's category cache
+						invalidate_user_cache();
+  
+						return true;
+					}
+					elseif ($deltadays > $conf_nbc_UserAdvManager_ConfirmMail[1]) // If timelimit exeeds
+					{
+						return false;
+					}
+				}
+				// Verify Confirmmail with time limit OFF
+				else
+				{
+					list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+					$query = '
+						UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+						SET date_check="'.$dbnow.'"
+						WHERE id = "'.$id.'"
 					;';
-				pwg_query($query);
-      
-				if ( $conf_nbc_UserAdvManager[3] <> -1 )
-				{
-					$query = "
-						DELETE FROM ".USER_GROUP_TABLE."
-						WHERE user_id = '".$data['user_id']."'
-						AND group_id = '".$conf_nbc_UserAdvManager[3]."'
+					pwg_query($query);
+      
+					if ($conf_nbc_UserAdvManager[3] <> -1)
+					{
+						$query = "
+							DELETE FROM ".USER_GROUP_TABLE."
+							WHERE user_id = '".$data['user_id']."'
+							AND group_id = '".$conf_nbc_UserAdvManager[3]."'
 						;";
-					pwg_query($query);
+						pwg_query($query);
+					}
+    
+					if ($conf_nbc_UserAdvManager[4] <> -1)
+					{
+						$query = "
+							DELETE FROM ".USER_GROUP_TABLE."
+							WHERE user_id = '".$data['user_id']."'
+							AND group_id = '".$conf_nbc_UserAdvManager[4]."'
+						;";
+						pwg_query($query);
+
+						$query = "
+							INSERT INTO ".USER_GROUP_TABLE."
+								(user_id, group_id)
+							VALUES
+								('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
+						;";
+						pwg_query($query);
+					}
+
+					if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status'])))
+					{
+						$query = "
+							UPDATE ".USER_INFOS_TABLE."
+							SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
+							WHERE user_id = '".$data['user_id']."'
+						;";
+						pwg_query($query);
+					}
+					// Refresh user's category cache
+					invalidate_user_cache();
+  
+					return true;
 				}
-	    
-				if ( $conf_nbc_UserAdvManager[4] <> -1 ) // Change user's group 
-				{
-					$query = "
-						DELETE FROM ".USER_GROUP_TABLE."
-						WHERE user_id = '".$data['user_id']."'
-						AND group_id = '".$conf_nbc_UserAdvManager[4]."'
-						;";
-					pwg_query($query);
-	
-					$query = "
-						INSERT INTO ".USER_GROUP_TABLE."
-							(user_id, group_id)
-						VALUES
-							('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
-						;";
-					pwg_query($query);
-				}
-
-				if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) // Change user's status
-				{
-					$query = "
-						UPDATE ".USER_INFOS_TABLE."
-						SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
-						WHERE user_id = '".$data['user_id']."'
-						;";
-					pwg_query($query);
-				}
-			// Refresh user's category cache
-				invalidate_user_cache();
-  
-				return true;
-			}
-			elseif ($deltadays > $conf_nbc_UserAdvManager_ConfirmMail[1]) // If timelimit exeeds
-			{
-				return false;
 			}
 		}
-		// Verify Confirmmail with time limit OFF
-		else
-		{
+	}
+  else
+    return false;
+}
+
+/* Function called from UserAdvManager_admin.php to force users validation by admin */
+function ForceValidation($id)
+{
+  global $conf;
+
+  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+  
+  $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+        
+  $query = "
+    SELECT COUNT(*)
+    FROM ".USER_CONFIRM_MAIL_TABLE."
+    WHERE user_id = '".$id."'
+  ;";
+  list($count) = mysql_fetch_row(pwg_query($query));
+
+  if ($count == 1)
+  {
+    $query = "
+      SELECT user_id, status, date_check
+      FROM ".USER_CONFIRM_MAIL_TABLE."
+      WHERE user_id = '".$id."'
+    ;";
+    $data = mysql_fetch_array(pwg_query($query));
+
+    if (!empty($data) and isset($data['user_id']) and !isset($data['date_check']))
+    {      
 			list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
 
-			$query = '
-				UPDATE '.USER_CONFIRM_MAIL_TABLE.'
-				SET date_check="'.$dbnow.'"
-				WHERE id = "'.$id.'"
-				;';
+			$query = "
+				UPDATE ".USER_CONFIRM_MAIL_TABLE."
+				SET date_check='".$dbnow."'
+				WHERE user_id = '".$data['user_id']."'
+			;";
 			pwg_query($query);
-      
-			if ( $conf_nbc_UserAdvManager[3] <> -1 )
+	     
+			if ($conf_nbc_UserAdvManager[3] <> -1)
 			{
 				$query = "
@@ -394,9 +483,9 @@
 					WHERE user_id = '".$data['user_id']."'
 					AND group_id = '".$conf_nbc_UserAdvManager[3]."'
-					;";
+				;";
 				pwg_query($query);
 			}
-    
-			if ( $conf_nbc_UserAdvManager[4] <> -1 )
+  
+			if ($conf_nbc_UserAdvManager[4] <> -1)
 			{
 				$query = "
@@ -404,7 +493,7 @@
 					WHERE user_id = '".$data['user_id']."'
 					AND group_id = '".$conf_nbc_UserAdvManager[4]."'
-					;";
+				;";
 				pwg_query($query);
-
+	
 				$query = "
 					INSERT INTO ".USER_GROUP_TABLE."
@@ -412,9 +501,9 @@
 					VALUES
 						('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
-					;";
+				;";
 				pwg_query($query);
 			}
 
-			if ( ( $conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']) ) )
+			if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status'])))
 			{
 				$query = "
@@ -422,25 +511,20 @@
 					SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
 					WHERE user_id = '".$data['user_id']."'
-					;";
+				;";
 				pwg_query($query);
 			}
-// Refresh user's category cache
+			// Refresh user's category cache
 			invalidate_user_cache();
-  
 			return true;
 		}
-      }
-    }
-  }
-  else
-    return false;
-}
-
-
+	}
+}
+
+/* Function called from main.inc.php - Get username case insensitive */
 function NotSensibleSearchUsername($username)
 {
   global $conf;
   
-  if ( isset($username) )
+  if (isset($username))
   {
     $query = "
@@ -456,9 +540,10 @@
 
 
+/* Obsolete function - Check for single email in database */
 function SearchMail($email)
 {
   global $conf, $lang;
   
-  if ( isset($email) )
+  if (isset($email))
   {
     $query = "
@@ -473,4 +558,6 @@
 }
 
+
+/* Function called from main.inc.php - Check if username matches forbidden caracters */
 function ValidateUsername($login)
 {
@@ -479,5 +566,5 @@
   $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
 
-  if ( isset($login) and isset($conf_nbc_UserAdvManager[8]) and $conf_nbc_UserAdvManager[8] <> '' )
+  if (isset($login) and isset($conf_nbc_UserAdvManager[8]) and $conf_nbc_UserAdvManager[8] <> '')
   {
   	$pattern = '/'.$conf_nbc_UserAdvManager[8].'/';
@@ -494,4 +581,6 @@
 
 
+/* Obsolete function - Check for no forbidden email provider */
+/* This don't work on function call */
 function ValidateEmailProvider($email)
 {
@@ -515,4 +604,5 @@
 
 
+/* Function called from UserAdvManager.php - Get unvalidated users according time limit */
 function get_unvalid_user_list()
 {
@@ -520,72 +610,72 @@
           
 	/* Get ConfirmMail configuration */
-    $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
+	$conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
           
 	/* Get UserAdvManager configuration */
 	$conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();  
   
-    $users = array();
+  $users = array();
     
 	/* search users depending expiration date */
-    $query = '
-    	SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
-											u.'.$conf['user_fields']['username'].' AS username,
-                      u.'.$conf['user_fields']['email'].' AS email,
-                      ui.status,
-                      ui.adviser,
-                      ui.enabled_high,
-                      ui.level,
-                      ui.registration_date,
-                      ug.group_id
-			FROM '.USERS_TABLE.' AS u
-			INNER JOIN '.USER_INFOS_TABLE.' AS ui
-				ON u.'.$conf['user_fields']['id'].' = ui.user_id
-   		INNER JOIN '.USER_GROUP_TABLE.' AS ug
-       	ON u.'.$conf['user_fields']['id'].' = ug.user_id
-     	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].'"
-     	ORDER BY id ASC
-		;';
+  $query = '
+  	SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
+										u.'.$conf['user_fields']['username'].' AS username,
+                    u.'.$conf['user_fields']['email'].' AS email,
+                    ui.status,
+                    ui.adviser,
+                    ui.enabled_high,
+                    ui.level,
+                    ui.registration_date,
+                    ug.group_id
+		FROM '.USERS_TABLE.' AS u
+		INNER JOIN '.USER_INFOS_TABLE.' AS ui
+			ON u.'.$conf['user_fields']['id'].' = ui.user_id
+ 		INNER JOIN '.USER_GROUP_TABLE.' AS ug
+    	ON u.'.$conf['user_fields']['id'].' = ug.user_id
+  	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].'"
+		ORDER BY id ASC
+	;';
 
 	$result = pwg_query($query);
       
-    while ($row = mysql_fetch_array($result))
-   	{
-    	$user = $row;
-        $user['groups'] = array();
-
-        array_push($users, $user);
+  while ($row = mysql_fetch_array($result))
+  {
+  	$user = $row;
+    $user['groups'] = array();
+
+    array_push($users, $user);
 	}
 
 	/* add group lists */
-    $user_ids = array();
-    foreach ($users as $i => $user)
-    {
-    	$user_ids[$i] = $user['id'];
+  $user_ids = array();
+  foreach ($users as $i => $user)
+  {
+  	$user_ids[$i] = $user['id'];
 	}
 	
 	$user_nums = array_flip($user_ids);
 
-    if (count($user_ids) > 0)
-    {
-    	$query = '
-        	SELECT user_id, group_id
+  if (count($user_ids) > 0)
+  {
+  	$query = '
+    	SELECT user_id, group_id
 			FROM '.USER_GROUP_TABLE.'
-            WHERE user_id IN ('.implode(',', $user_ids).')
-            ;';
+      WHERE user_id IN ('.implode(',', $user_ids).')
+		;';
         
 		$result = pwg_query($query);
         
-    	while ($row = mysql_fetch_array($result))
-    	{
-        	array_push(
-            	$users[$user_nums[$row['user_id']]]['groups'],
-                $row['group_id']
-                );
-         }
+    while ($row = mysql_fetch_array($result))
+    {
+    	array_push(
+      	$users[$user_nums[$row['user_id']]]['groups'],
+        $row['group_id']
+			);
+		}
 	}
 
-return $users;
+	return $users;
 }
 ?>
Index: extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 3858)
@@ -5,32 +5,17 @@
 $conf_UserAdvManager = isset($conf['UserAdvManager']) ? explode(";" , $conf['UserAdvManager']) : array();
 
-$lang['infos_mail %s'] = '%s, please find here your information to login the gallery :';
-$lang['Password: %s'] = 'Password: %s';
-$lang['Add of %s'] = 'Add of %s';
-$lang['Update of %s'] = 'Update of %s';
 
-$lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s';
-
-$lang['title_confirm_mail'] = 'Validate your registration';
-$lang['confirm_mail_page_title'] = 'Validate your registration';
-$lang['confirm_mail_ok'] = '<br/><br/><br/>Thank you to have confirmed your email address and your registration on the gallery. Have fun !<br/><br/><br/><br/>';
-$lang['confirm_mail_bad'] = '<br/><br/><br/>Your validation key is broken or you haven\'t validated your registration. Please contact the gallery\'s webmaster to check this issue.<br/><br/><br/><br/>';
-
+/* Global Configuration Tab */
 $lang['Title_Tab1'] = 'UserAdvManager - Global Configuration';
-$lang['Tab_Global_Options'] = 'Global Configuration';
-
-$lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Configuration';
-$lang['Tab_ConfirmMail_Options'] = 'ConfirmMail Configuration';
-
+$lang['Tab_Global'] = 'Global Configuration';
 $lang['UserAdvManager_Title'] = 'Advanced users settings';
-
-$lang['UserAdvManager_Mail_Info'] = 'Mail information user';
-$lang['UserAdvManager_Mail_Info_true'] = 'Send a information mail to the user when he registering or updating his profile.';
-$lang['UserAdvManager_Mail_Info_false'] = 'Turns off the sending of mail.';
-$lang['UserAdvManager_MailInfo_Text'] = 'Text used to introduce the email sent to user on his registration or at his profile update.<br>(!!! <blink>WARNING !</blink> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
-$lang['UserAdvManager_No_Casse'] = 'User insensitive';
-$lang['UserAdvManager_No_Casse_true'] = 'Make the user account insensitive at the registration and the identification step';
-$lang['UserAdvManager_No_Casse_false'] = 'Let the user-sensitive.';
-$lang['UserAdvManager_Username_Char'] = 'Limited charset for unsername';
+$lang['UserAdvManager_Mail_Info'] = ' Mail information user';
+$lang['UserAdvManager_Mail_Info_true'] = ' Send an information mail to the user when he registes or updates his profile.';
+$lang['UserAdvManager_Mail_Info_false'] = ' Turns off the sending of mail.';
+$lang['UserAdvManager_MailInfo_Text'] = ' Text used to introduce the email sent to user on his registration or at his profile update.<br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_No_Casse'] = ' User insensitive';
+$lang['UserAdvManager_No_Casse_true'] = ' Make the user account insensitive at the registration and the identification step';
+$lang['UserAdvManager_No_Casse_false'] = ' Let the user-sensitive.';
+$lang['UserAdvManager_Username_Char'] = ' Limited charset for unsername';
 $lang['UserAdvManager_Username_Char_true'] = ' The following characters will be forbidden for username choice';
 $lang['UserAdvManager_Username_Char_false'] = ' Use the default username charset control.';
@@ -38,5 +23,5 @@
 $lang['UserAdvManager_Confirm_Mail_true'] = ' Send an email to user to allow him to validate his email and his registration.';
 $lang['UserAdvManager_Confirm_Mail_false'] = ' Use the default Piwigo registration system (without registration validation).';
-$lang['UserAdvManager_ConfirmMail_Text'] = 'Text used to introduce the email sent to user to allow him to validate his email address<br>(!!! <blink>WARNING !</blink> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_ConfirmMail_Text'] = 'Text used to introduce the email sent to user to allow him to validate his email address<br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
 $lang['UserAdvManager_No_Confirm_Group'] = 'Group to use for the users who haven\'t validated their email address.';
 $lang['UserAdvManager_Validated_Group'] = 'Group to use for the users who have validated their email address.';
@@ -49,28 +34,99 @@
 $lang['UserAdvManager_MailExclusion_true'] = ' Set the email provider exclusion ON (i.e. : @hotmail.* or @msn.*)';
 $lang['UserAdvManager_MailExclusion_false'] = ' Set the email provider exclusion OFF.';
-$lang['UserAdvManager_MailExclusion_List'] = ' If email provider exclusion is set to ON, fill the email domains to exclude below. You have to use the following format :<br/>@[domaine_name].[domaine_extension] - Example : @hotmail.com<br/>Seperate the different domains with a comma (,)<br/>';
-
+$lang['UserAdvManager_MailExclusion_List'] = ' If email provider exclusion is set to ON, fill the email domains to exclude below. You have to use the following format :<br>@[domaine_name].[domaine_extension] - Example : @hotmail.com<br>Seperate the different domains with a comma (,)<br>';
 $lang['audit'] = 'Audit';
 $lang['submit'] = 'Submit';
 
+
+/* ConfirmMail Configuration Tab */
+$lang['ConfirmMail_Title'] = 'Advanced management and settings of register confirmation by mail';
+$lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Settings';
+$lang['Tab_ConfirmMail'] = 'ConfirmMail Settings';
+$lang['UserAdvManager_ConfirmMail_Info'] = 'Time limitation for validation of registration :<br>If you enable this option, select the desired time (x) )in the field below. Visitors who register will then have x days to validate their registration. After this period the validation link they have received by mail will be expired.<br>';
+$lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Enable limiting the registration deadline.';
+$lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Disable limiting the registration deadline.';
+$lang['UserAdvManager_ConfirmMail_TimeOut'] = 'Validation delay :';
+$lang['UserAdvManager_ConfirmMail_Delay_Info'] = 'Enter the number of days before expiry of the registration validation : ';
+/* This function can't work due to no access to server's cron functionnalities */
+//$lang['UserAdvManager_ConfirmMail_AutoDel'] = 'Suppression automatique des comptes non validés après le délai d\'expiration : ';
+//$lang['UserAdvManager_ConfirmMail_AutoDel_true'] = 'Activer la suppression automatique - <b style="text-decoration: blink underline;">ATTENTION !</b> La suppression est aveugle et sans notification.';
+//$lang['UserAdvManager_ConfirmMail_AutoDel_false'] = 'Désactiver la suppression automatique.';
+$lang['UserAdvManager_ConfirmMail_Remail'] = 'Enable or disable email reminder of unvalidated registers :';
+$lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Enable email reminder';
+$lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Disable email reminder';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the recall message with regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the recall message without regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+
+
+/* UserManager Tab */
+$lang['UserManager_Title'] = 'Advanced settings of unvalidated registered users';
+$lang['Title_Tab3'] = 'UserAdvManager - Visitors management';
+$lang['Tab_UserManager'] = 'Visitors management';
+$lang['UserAdvManager_ConfirmMail_User_List'] = 'When limiting the deadline for registration is enabled, you will find below the list of users awaiting validation, <b style="text-decoration: underline;">whether or not</b> they are in time to validate.<br><br>In this view, you can:
+<br><br>
+- Manually delete accounts <b>(manual drain)</b>
+<br>
+- Generate email reminder <b>without</b> generating a new key. Warning: Send an email reminder to targeted visitors. This function does not reset the date of registration of targeted visitors and the timeout is still valid.
+<br>
+- Generate email reminder <b>with</b> generating a new key. Warning : Send an email reminder to targeted visitors. This function also resets the date of registration of targeted visitors which equates to extend the deadline for validation.<br>
+- Submit a registration awaiting validation manually even if the expiry date has passed <b>(forcing validation)</b>.
+<br>';
+$lang['Registration'] = 'Registration date';
+
+
+/* Mailing */
+$lang['infos_mail %s'] = '%s, please find here your information to login the gallery :';
+$lang['Password: %s'] = 'Password: %s';
+$lang['Add of %s'] = 'Add of %s';
+$lang['Update of %s'] = 'Update of %s';
+$lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s';
+$lang['Reminder_with_key_of_%s'] = '%s, your validation key has been renewed';
+$lang['Reminder_without_key_of_%s'] = '%s, your validation key will expire';
+
+
+/* Email confirmation page */
+$lang['title_confirm_mail'] = 'Validate your registration';
+$lang['confirm_mail_page_title'] = 'Validate your registration';
+$lang['confirm_mail_ok'] = '<br><br><br>Thank you to have confirmed your email address and your registration on the gallery. Have fun !<br><br><br><br>';
+$lang['confirm_mail_bad'] = '<br><br><br>Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.<br><br><br><br>';
+
+
+/* Errors and Warnings */
+$lang['UserAdvManager_audit_ok'] = 'Audit OK';
+$lang['UserAdvManager_save_config'] ='Configuration saved.';
 $lang['Err_audit_no_casse'] = '<b>These accounts are identical to the case closely :</b> ';
 $lang['Err_audit_username_char'] = '<b>This account uses one or more forbidden characters :</b> ';
 $lang['Err_audit_email_forbidden'] = '<b>This account uses a forbidden email provider :</b> ';
-$lang['Err_audit_advise'] = '<b>you make a correction to comply with new rules that you have activated.<br>use a utility géstion database to correct user accounts directly in the table ### _USERS';
-$lang['UserAdvManager_audit_ok'] = 'Audit OK';
-$lang['UserAdvManager_save_config'] ='Configuration registered.';
-
+$lang['Err_audit_advise'] = '<b>you have to perform corrections to comply with new rules that you have activated.<br>Use a database management utility to correct user accounts directly in the table ### _USERS';
 $lang['UserAdvManager_Empty Author'] = 'The author field have to be filled to send a comment.';
-
 if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' )
-  $lang['reg_err_login5'] = 'user name is already taken, attention name is insensitive (Shift = Tiny).';
-$lang['reg_err_login6'] = 'Username does not contain the following characters: ';
+	$lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).';
+$lang['reg_err_login6'] = 'Username does not match the following characters: ';
 $lang['reg_err_login7'] = 'Your email provider is banned for registration. Banned email providers are: ';
-
-$lang['invalid_pwd'] = 'User name or password invalid !';
-
 $lang['UserAdvManager_empty_pwd'] = '[empty password]';
 $lang['UserAdvManager_no_update_pwd'] = '[profile updated without password changed]';
+$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['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';
+$lang['No_validation_for_Webmaster'] = 'The "Webmaster" account is not subject to validation';
+$lang['No_validation_for_your_account'] = 'You personnal admin account is not subject to validation';
+$lang['Database_Error'] = '<b><u>Warning! Critical integrity error in your database.</u></b><br><br>Please check the integrity of the #_user_confirm_mail table.';
 
-$lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in tab "Global Configuration".';
+
+/* Processing messages */
+$lang['%d_Mail_With_Key'] = '%d message with key renewal was sent';
+$lang['%d_Mails_With_Key'] = '%d messages with key renewal were sent';
+$lang['%d_Reminder_Sent'] = '%d reminder message was sent';
+$lang['%d_Reminders_Sent'] = '%d reminder messages were sent';
+$lang['%d_Validated_User'] = '%d User validated manually';
+$lang['%d_Validated_Users'] = '%d Users validated manually';
+
+
+/* Action button names */
+$lang['Delete_selected'] = 'Delete';
+$lang['Mail_without_key'] = 'Reminder without key';
+$lang['Mail_with_key'] = 'Reminder with key';
+$lang['Force_Validation'] = 'Forced validation';
 ?>
Index: extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 3858)
@@ -5,21 +5,9 @@
 $conf_UserAdvManager = isset($conf['UserAdvManager']) ? explode(";" , $conf['UserAdvManager']) : array();
 
-$lang['infos_mail %s'] = '%s, voici vos informations pour vous identifier sur la galerie :';
-$lang['Password: %s'] = 'Mot de passe: %s';
-$lang['Add of %s'] = 'Création de %s';
-$lang['Update of %s'] = 'Mise à jour de %s';
 
-$lang['Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s';
-
-$lang['title_confirm_mail'] = 'Confirmation de votre inscription';
-$lang['confirm_mail_page_title'] = 'Confirmation d\'inscription';
-$lang['confirm_mail_ok'] = '<br><br><br>Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...<br><br><br><br>';
-$lang['confirm_mail_bad'] = '<br><br><br>Votre clef d\'activation unique est érronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.<br><br><br><br>';
-
+/* Global Configuration Tab */
 $lang['Title_Tab1'] = 'UserAdvManager - Configuration Générale';
 $lang['Tab_Global'] = 'Configuration Générale';
-
 $lang['UserAdvManager_Title'] = 'Configuration avancée des utilisateurs';
-
 $lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur';
 $lang['UserAdvManager_Mail_Info_true'] = ' Envoyer un mail à l\'utilisateur reprenant ses infos lors de son inscription ou la mise à jour de son profil.';
@@ -47,35 +35,13 @@
 $lang['UserAdvManager_MailExclusion_false'] = ' Désactiver l\'exclusion des domaines de messagerie.';
 $lang['UserAdvManager_MailExclusion_List'] = ' Si l\'exclusion de domaines de messagerie est activée, saisissez les domaines à exclure ici. Il faut respecter le format suivant :<br>@[nom_du_domaine].[extension_du_domaine] - Exemple : @hotmail.com<br><br>Séparez les domaines par une virgule<br>';
-
-
 $lang['audit'] = 'Audit';
 $lang['submit'] = 'Valider';
 
-$lang['Err_audit_no_casse'] = '<b>Ces comptes sont identiques à la casse près :</b> ';
-$lang['Err_audit_username_char'] = '<b>Ce compte contient un ou des caractères interdits :</b> ';
-$lang['Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> ';
-$lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activé<br>utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b>';
-$lang['UserAdvManager_audit_ok'] = 'Audit OK';
-$lang['UserAdvManager_save_config'] ='Configuration enregistrée.';
 
-$lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.';
-
-if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' )
-	$lang['new_reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).';
-$lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : ';
-$lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : ';
-
-$lang['invalid_pwd'] = 'Nom utilisateur ou Mot de passe invalide !';
-
-$lang['UserAdvManager_empty_pwd'] = '[mot de passe vide]';
-$lang['UserAdvManager_no_update_pwd'] = '[mise à jour du profil sans changement du mot de passe]';
-
+/* ConfirmMail Configuration Tab */
 $lang['ConfirmMail_Title'] = 'Configuration et gestion avancée de la confirmation par mail';
-$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['Title_Tab2'] = 'UserAdvManager - Configuration de ConfirmMail';
 $lang['Tab_ConfirmMail'] = 'Configuration de ConfirmMail';
-$lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription :
-<br>
-Si vous activez cette option, sélectionnez le délai souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>';
+$lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription :<br>Si vous activez cette option, sélectionnez le délai (x) )souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>';
 $lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Activer la limitation du délai d\'inscription.';
 $lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Désactiver la limitation du délai d\'inscription.';
@@ -86,13 +52,13 @@
 //$lang['UserAdvManager_ConfirmMail_AutoDel_true'] = 'Activer la suppression automatique - <b style="text-decoration: blink underline;">ATTENTION !</b> La suppression est aveugle et sans notification.';
 //$lang['UserAdvManager_ConfirmMail_AutoDel_false'] = 'Désactiver la suppression automatique.';
-$lang['UserAdvManager_ConfirmMail_Remail'] = 'Activer ou désactiver la fonctionnalité de relance des inscrits non validés :';
-$lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer la relance par mail';
-$lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver la relance par mail';
-$lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de relance avec regénération de clé de validation.<br>Si laissé vide, le mail de relance ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br>(!!! <b style="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
-$lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de relance sans regénération de clé de validation.<br>Si laissé vide, le mail de relance sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br>(!!! <b style="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+$lang['UserAdvManager_ConfirmMail_Remail'] = 'Activer ou désactiver la fonctionnalité de rappel des inscrits non validés :<br>';
+$lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer le rappel par mail';
+$lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver le rappel par mail';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation.<br>Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br>(!!! <b style="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation.<br>Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br>(!!! <b style="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
 
 
-$lang['UserManager_Title'] = 'Configuration et gestion avancée de la confirmation par mail';
-$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".';
+/* UserManager Tab */
+$lang['UserManager_Title'] = 'Gestion avancée des inscrits non validés';
 $lang['Title_Tab3'] = 'UserAdvManager - Gestion des visiteurs';
 $lang['Tab_UserManager'] = 'Gestion des visiteurs';
@@ -101,26 +67,66 @@
 - Supprimer manuellement les comptes <b>(purge manuelle)</b>
 <br>
-- Générer l\'email de relance <b>sans génération</b> d\'une nouvelle clef. Rrappel pour le visiteur qu\'il doit valider son inscription. Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité.
+- Générer l\'email de rappel <b>sans génération</b> d\'une nouvelle clef. Rappel : Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité.
 <br>
-- Générer l\'email de relance <b>avec génération</b> d\'une nouvelle clef. Rappel pour le visiteur qu\'il doit valider son inscription. Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.<br>
+- Générer l\'email de rappel <b>avec génération</b> d\'une nouvelle clef. Rappel : Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.<br>
 - Valider manuellement une inscription en attente de validation même si la date d\'expiration est révolue <b>(forçage de la validation)</b>.
 <br>';
 $lang['Registration'] = 'Date d\'enregistrement';
+
+
+/* Mailing */
+$lang['infos_mail %s'] = '%s, voici vos informations pour vous identifier sur la galerie :';
+$lang['Password: %s'] = 'Mot de passe: %s';
+$lang['Add of %s'] = 'Création de %s';
+$lang['Update of %s'] = 'Mise à jour de %s';
+$lang['Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s';
+$lang['Reminder_with_key_of_%s'] = '%s, votre clé de confirmation a été renouvelée';
+$lang['Reminder_without_key_of_%s'] = '%s, votre clé de confirmation va expirer';
+
+
+/* Email confirmation page */
+$lang['title_confirm_mail'] = 'Confirmation de votre inscription';
+$lang['confirm_mail_page_title'] = 'Confirmation d\'inscription';
+$lang['confirm_mail_ok'] = '<br><br><br>Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...<br><br><br><br>';
+$lang['confirm_mail_bad'] = '<br><br><br>Votre clef d\'activation unique est érronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.<br><br><br><br>';
+
+
+/* Errors and Warnings */
+$lang['UserAdvManager_audit_ok'] = 'Audit OK';
+$lang['UserAdvManager_save_config'] ='Configuration enregistrée.';
+$lang['Err_audit_no_casse'] = '<b>Ces comptes sont identiques à la casse près :</b> ';
+$lang['Err_audit_username_char'] = '<b>Ce compte contient un ou des caractères interdits :</b> ';
+$lang['Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> ';
+$lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activé<br>utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b>';
+$lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.';
+if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' )
+	$lang['new_reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).';
+$lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : ';
+$lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : ';
+$lang['UserAdvManager_empty_pwd'] = '[mot de passe vide]';
+$lang['UserAdvManager_no_update_pwd'] = '[mise à jour du profil sans changement du mot de passe]';
+$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['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';
 $lang['No_validation_for_Webmaster'] = 'Le compte du Webmaster n\'est pas soumis à validation';
 $lang['No_validation_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à validation';
+$lang['Database_Error'] = '<b><u>Attention ! Erreur critique d\'intégrité dans votre base de données.</u></b><br><br>Veuillez contrôler l\'intégrité de la table #_user_confirm_mail.';
 
+
+/* Processing messages */
 $lang['%d_Mail_With_Key'] = '%d message avec renouvellement de clé a été envoyé';
 $lang['%d_Mails_With_Key'] = '%d messages avec renouvellement de clé ont été envoyés';
-$lang['%d_Reminder_Sent'] = '%d message de relance a été envoyé';
-$lang['%d_Reminders_Sent'] = '%d messages de relance ont été envoyés';
+$lang['%d_Reminder_Sent'] = '%d message de rappel a été envoyé';
+$lang['%d_Reminders_Sent'] = '%d messages de rappel ont été envoyés';
+$lang['%d_Validated_User'] = '%d Utilisateur validé manuellement';
+$lang['%d_Validated_Users'] = '%d Utilisateurs validés manuellement';
 
-$lang['Reminder_with_key_of_%s'] = '%s, votre clé de confirmation a été renouvelée';
-$lang['Reminder_without_key_of_%s'] = '%s, votre clé de confirmation va expirer';
 
+/* Action button names */
 $lang['Delete_selected'] = 'Supprimer';
-$lang['Mail_without_key'] = 'Relance sans clé';
-$lang['Mail_with_key'] = 'Relance avec clé';
+$lang['Mail_without_key'] = 'rappel sans clé';
+$lang['Mail_with_key'] = 'rappel avec clé';
 $lang['Force_Validation'] = 'Validation forcée';
 ?>
Index: extensions/NBC_UserAdvManager/trunk/main.inc.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 3857)
+++ extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 3858)
@@ -50,6 +50,6 @@
 -- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin 
 
--- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Force expiration, list unvalidated users,...)
-			Beautify plugin's main admin panel
+-- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Renew validation key, list unvalidated users,...)
+						Beautify plugin's main admin panel
 
 */
@@ -62,17 +62,4 @@
 
 ++ No single email check for admins (new trigger needed in (functions_user.inc.php ?))
-
-++ Administration page for Confirm Mail
-  ++ Admin tabsheet for Confirm Mail to set options :
-  		++ Setting a delay time with timeout for email confirmation (Timeout = CurrentDate - RegistrationDate)
-  		-- List of users who haven't validated - could be easy to set with groups options : Unvalidated users are in a "Unvalidated" group.
-  		++ List of users with expired validation time
-  		-- List of validates users ? -> Same as "List of users who haven't validated" : They could belong to a "validated" group.
-  		++ Opportunities to take actions on database tables :
-    		++ Re-asking validation (case of non reception of validation email)
-    		++ Force expiration
-			++ Force confirmation
-    		++ Cleanup expired user's accounts
-    	++ (...)
 
 ++ Password control and enforcement
@@ -93,10 +80,12 @@
 
 
-
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
 define('NBC_UserAdvManager_DIR' , basename(dirname(__FILE__)));
 define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+
 include_once (NBC_UserAdvManager_PATH.'include/constants.php');
 include_once (NBC_UserAdvManager_PATH.'include/functions_UserAdvManager.inc.php');
+
 load_language('plugin.lang', NBC_UserAdvManager_PATH);
 
@@ -129,5 +118,6 @@
 
   if (( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
-    SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true);
+	
+	SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true);
 }
 
@@ -205,18 +195,18 @@
 	  //}
       /* This work with a code copy of ValidateEmailProvider() function */
-	  if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email']))
-		{
-		  $ncsemail = strtolower($_POST['email']);
-		  $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
-		  for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
+			if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email']))
+			{
+		  	$ncsemail = strtolower($_POST['email']);
+		  	$conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
+		  	for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
 		    {
 	    	  $pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
-			  if (preg_match($pattern, $ncsemail))
-			    {
-		          $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
-		          $_POST['login'] = '';
+			  	if (preg_match($pattern, $ncsemail))
+	    		{
+		      	$lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
+		        $_POST['login'] = '';
+					}
 				}
 			}
-		}
     }
   }
@@ -251,15 +241,15 @@
       //}
       /* This work with a code copy of ValidateEmailProvider() function */
-		if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))
+			if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))
 		  {
 		  	$ncsemail = strtolower($_POST['mail_address']);
 		    $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
-			for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
+				for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
 			  {
-	    	  	$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
+ 	  			$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
 			  	if (preg_match($pattern, $ncsemail))
 				  {
-				    $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
-					$_POST['login'] = '';
+				  	$lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
+						$_POST['login'] = '';
 				  }
 			  }
@@ -312,32 +302,23 @@
             $errors[] = $mail_error;
           }
-        /* This don't work on user's profile page - Why ?? */
-		if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))
-		  {
-		  	$ncsemail = strtolower($_POST['mail_address']);
-		    $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
-			for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
-			  {
-	    	  	$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
-			  	if (preg_match($pattern, $ncsemail))
-				  {
-				    $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
-				  }
-			  }
-		  }
-	      if (!empty($mail_error))
+          
+					if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))
+		  		{
+		  			$ncsemail = strtolower($_POST['mail_address']);
+		    		$conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
+						for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
+			  		{
+ 	  					$pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
+			  			if (preg_match($pattern, $ncsemail))
+				  		{
+				    		$mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";
+				  		}
+			  		}
+		  		}
+	      	if (!empty($mail_error))
           {
             $errors[] = $mail_error;
           }
         }
-		/* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/
-        //if (isset($_POST['mail_address']))
-        //{
-        //  $mail_error = ValidateEmailProvider($_POST['mail_address']);
-        //  if (!empty($mail_error))
-        //  {
-        //    $errors[] = $mail_error;
-        //  }
-        //}
 
         $typemail = 3;
