Index: /extensions/UserAdvManager/trunk/admin/UAM_admin.php
===================================================================
--- /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 17918)
@@ -46,5 +46,5 @@
 	$page['tab'] = 'global';
 else
-  $page['tab'] = $_GET['tab'];
+ $page['tab'] = $_GET['tab'];
 
 $tabsheet = new tabsheet();
@@ -52,7 +52,7 @@
                l10n('UAM_Tab_Global'),
                $my_base_url.'&amp;tab=global');
-  $tabsheet->add('userlist',
-                 l10n('UAM_Tracking registered users'),
-                 $my_base_url.'&amp;tab=userlist');
+$tabsheet->add('userlist',
+               l10n('UAM_Tracking registered users'),
+               $my_base_url.'&amp;tab=userlist');
 $tabsheet->add('usermanager',
                l10n('UAM_Tracking confirmations'),
@@ -83,15 +83,15 @@
 if (function_exists('set_fckeditor_instance'))
 {
-  $fcke_config = unserialize($conf['FCKEditor']);
+		$fcke_config = unserialize($conf['FCKEditor']);
   foreach($areas as $area)
   {
-    if (!isset($fcke_config[$area]))
+				if (!isset($fcke_config[$area]))
     {
       $fcke_config[$area] = false;
     }
   }
-  $conf['FCKEditor'] = serialize($fcke_config);
-
-  set_fckeditor_instance($areas, $toolbar, $width, $height);
+		$conf['FCKEditor'] = serialize($fcke_config);
+
+		set_fckeditor_instance($areas, $toolbar, $width, $height);
 }
 
@@ -108,60 +108,60 @@
 // +-----------------------------------------------------------------------+
 // *************************************************************************
-  case 'global':
-
-	if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_PwdReset']) and isset($_POST['UAM_RejectConnexion']))
-  {
+		case 'global':
+
+		if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_PwdReset']) and isset($_POST['UAM_RejectConnexion']))
+		{
 
     // Render email contents fields
     // ----------------------------
-		$_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text'])));
-
-    $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text'])));
-
-    $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText'])));
-
-    $_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
-
-    $_POST['UAM_GTAutoMailText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMailText'])));
-
-    $_POST['UAM_AdminValidationMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Text'])));
-
-    $_POST['UAM_CustomPasswRetr_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomPasswRetr_Text'])));
-
-    $_POST['UAM_USRAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
-
-    $_POST['UAM_CustomRejectConnexion_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomRejectConnexion_Text'])));
-
-    // Render email subjects fields
+				$_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text'])));
+
+				$_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text'])));
+
+				$_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText'])));
+
+				$_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
+
+				$_POST['UAM_GTAutoMailText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMailText'])));
+
+				$_POST['UAM_AdminValidationMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Text'])));
+
+				$_POST['UAM_CustomPasswRetr_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomPasswRetr_Text'])));
+
+				$_POST['UAM_USRAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
+
+				$_POST['UAM_CustomRejectConnexion_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomRejectConnexion_Text'])));
+
+				// Render email subjects fields
     // ---------------------------
-    $_POST['UAM_ConfirmMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Subject'])));
-
-    $_POST['UAM_ConfirmMail_Remail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Remail_Subject'])));
-
-  $_POST['UAM_InfoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_InfoMail_Subject'])));
-
-  $_POST['UAM_GTAutoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMail_Subject'])));
-
-  $_POST['UAM_GTReminder_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTReminder_Subject'])));
-
-  $_POST['UAM_AdminValidationMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Subject'])));
-
-
-  // Check if emails are mandatory for registrations (needed for email exclusion option)
-  // -----------------------------------------------------------------------------------
-  if ($conf['obligatory_user_mail_address'])
-  {
-    // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
-    // --------------------------------------------------------------------------------------
-    if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
-    {
-      array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
-      $UAM_Exclusionlist_Error = true;
-    }
-  }
-  elseif (!$conf['obligatory_user_mail_address'])
-  {
-    $_POST['UAM_MailExclusion_List'] = '';
-  }
+				$_POST['UAM_ConfirmMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Subject'])));
+
+				$_POST['UAM_ConfirmMail_Remail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Remail_Subject'])));
+
+				$_POST['UAM_InfoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_InfoMail_Subject'])));
+
+				$_POST['UAM_GTAutoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMail_Subject'])));
+
+				$_POST['UAM_GTReminder_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTReminder_Subject'])));
+
+				$_POST['UAM_AdminValidationMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Subject'])));
+
+
+				// Check if emails are mandatory for registrations (needed for email exclusion option)
+				// -----------------------------------------------------------------------------------
+				if ($conf['obligatory_user_mail_address'])
+				{
+							// Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
+    		// --------------------------------------------------------------------------------------
+    		if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
+    		{
+      		array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
+      		$UAM_Exclusionlist_Error = true;
+    		}
+  		}
+  		elseif (!$conf['obligatory_user_mail_address'])
+  		{
+    		$_POST['UAM_MailExclusion_List'] = '';
+  		}
 
     // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled
@@ -172,5 +172,5 @@
     if (((isset($conf_UAM['1']) and ($conf_UAM['1'] == 'false' or $conf_UAM['1'] == 'local')) or ($_POST['UAM_Confirm_Mail'] == 'false' or $_POST['UAM_Confirm_Mail'] == 'local')) and $_POST['UAM_GTAutoMail'] == 'true')
     {
-      $newvalue = 'false';
+    		$newvalue = 'false';
       $_POST['UAM_GTAutoMail'] = $newvalue;
       array_push($page['errors'], l10n('UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'));
@@ -187,6 +187,6 @@
     // Save global UAM configuration
     // -----------------------------
-		$newconf_UAM = array(
-      $_POST['UAM_Mail_Info'],
+				$newconf_UAM = array(
+    		$_POST['UAM_Mail_Info'],
       $_POST['UAM_Confirm_Mail'],
       (isset($_POST['UAM_No_Confirm_Group'])?$_POST['UAM_No_Confirm_Group']:''),
@@ -246,7 +246,7 @@
 
     $_POST['UAM_ConfirmMail_ReMail_Txt2'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt2'])));
-    
+
     $_POST['UAM_ConfirmMail_Custom_Txt1'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt1'])));
-    
+
     $_POST['UAM_ConfirmMail_Custom_Txt2'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt2'])));
 
@@ -266,5 +266,5 @@
     // Save ConfirmMail settings
     // -------------------------
-	  $newconf_UAM_ConfirmMail = array (
+	  	$newconf_UAM_ConfirmMail = array (
       $_POST['UAM_ConfirmMail_TimeOut'],
       $_POST['UAM_ConfirmMail_Delay'],
@@ -279,5 +279,5 @@
     conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail']));
 
-		array_push($page['infos'], l10n('UAM_save_config'));
+				array_push($page['infos'], l10n('UAM_save_config'));
   }
 
@@ -352,5 +352,5 @@
   $query = '
 SELECT id, name
-FROM '.GROUPS_TABLE.'
+		FROM '.GROUPS_TABLE.'
 ORDER BY name ASC
 ;';
@@ -364,16 +364,16 @@
     if (isset($conf_UAM[2]) and $conf_UAM[2] == $row['id'])
     {
-	  	$No_Valid = $row['id'];
-		}
+	  			$No_Valid = $row['id'];
+				}
     //configuration value for validated users
     if (isset($conf_UAM[3]) and $conf_UAM[3] == $row['id'])
-		{
-	  	$Valid = $row['id'];
-		}
+				{
+	  			$Valid = $row['id'];
+				}
     //configuration value for downgrade users
     if (isset($conf_UAM[25]) and $conf_UAM[25] == $row['id'])
-		{
-	  	$Downgrade = $row['id'];
-		}
+				{
+	  			$Downgrade = $row['id'];
+				}
   }
 	
@@ -381,9 +381,9 @@
   // ---------------------------------------------------
   $template->assign(
-    'No_Confirm_Group',
-   	array(
-	  	'group_options'=> $groups,
-	  	'group_selected' => $No_Valid
-			)
+  		'No_Confirm_Group',
+   			array(
+	  			'group_options'=> $groups,
+	  			'group_selected' => $No_Valid
+					)
  		);
 
@@ -391,9 +391,9 @@
   // -------------------------------------------------
   $template->assign(
-    'Validated_Group',
-		array(
-      'group_options'=> $groups,
-      'group_selected' => $Valid
-			)
+  		'Validated_Group',
+						array(
+      		'group_options'=> $groups,
+      		'group_selected' => $Valid
+					)
   	);
 
@@ -402,8 +402,8 @@
   $template->assign(
     'Downgrade_Group',
-		array(
-      'group_options'=> $groups,
-      'group_selected' => $Downgrade
-			)
+						array(
+      		'group_options'=> $groups,
+      		'group_selected' => $Downgrade
+					)
   	);
 	
@@ -428,10 +428,10 @@
     // ----------------------------------------------------
     $template->assign(
-      'No_Confirm_Status',
-      array(
-        'Status_options' => $status_options,
-        'Status_selected' => $No_Valid_Status
-			)
-	  );
+    		'No_Confirm_Status',
+    				array(
+        		'Status_options' => $status_options,
+        		'Status_selected' => $No_Valid_Status
+							)
+	  		);
   }
   
@@ -439,21 +439,21 @@
   // --------------------------
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
-  {
-	  $status_options[$status] = l10n('user_status_'.$status);
-	  if (isset($conf_UAM[4]) and $conf_UAM[4] == $status)
 		{
-		  $Valid_Status = $status;
-		}
+				$status_options[$status] = l10n('user_status_'.$status);
+				if (isset($conf_UAM[4]) and $conf_UAM[4] == $status)
+				{
+		  		$Valid_Status = $status;
+				}
 		
     // Template initialization for validated users status
     // --------------------------------------------------
     $template->assign(
-	  'Confirm_Status',
-	  array(
-		  'Status_options' => $status_options,
-		  'Status_selected' => $Valid_Status
-		  )
-	  );
-	}
+						'Confirm_Status',
+	  					array(
+		  						'Status_options' => $status_options,
+		  						'Status_selected' => $Valid_Status
+		  				)
+				);
+		}
 
   // Get downgrade status values
@@ -461,20 +461,20 @@
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
   {
-	  $status_options[$status] = l10n('user_status_'.$status);
-	  if (isset($conf_UAM[26]) and $conf_UAM[26] == $status)
-		{
-		  $Downgrade_Status = $status;
-		}
+				$status_options[$status] = l10n('user_status_'.$status);
+				if (isset($conf_UAM[26]) and $conf_UAM[26] == $status)
+				{
+		  		$Downgrade_Status = $status;
+				}
 		
     // Template initialization for validated users status
     // --------------------------------------------------
     $template->assign(
-	  'Downgrade_Status',
-	  array(
-		  'Status_options' => $status_options,
-		  'Status_selected' => $Downgrade_Status
-		  )
-	  );
-	}
+						'Downgrade_Status',
+								array(
+										'Status_options' => $status_options,
+										'Status_selected' => $Downgrade_Status
+								)
+				);
+		}
 
 
@@ -490,19 +490,19 @@
   foreach ($conf['available_permission_levels'] as $level)
   {
-    $level_options[$level] = l10n(sprintf('Level %d', $level));
-	  if (isset($conf_UAM[35]) and $conf_UAM[35] == $level)
-	  {
-	    $No_Valid_Level = $level;
-	  }
+				$level_options[$level] = l10n(sprintf('Level %d', $level));
+				if (isset($conf_UAM[35]) and $conf_UAM[35] == $level)
+				{
+						$No_Valid_Level = $level;
+				}
 
     // Template initialization for unvalidated users level
     // ---------------------------------------------------
     $template->assign(
-      'No_Valid_Level',
-      array(
-        'Level_options' => $level_options,
-        'Level_selected' => $No_Valid_Level
-			)
-	  );
+						'No_Valid_Level',
+								array(
+										'Level_options' => $level_options,
+										'Level_selected' => $No_Valid_Level
+								)
+				);
   }
 
@@ -511,19 +511,19 @@
   foreach ($conf['available_permission_levels'] as $level)
   {
-    $level_options[$level] = l10n(sprintf('Level %d', $level));
-	  if (isset($conf_UAM[36]) and $conf_UAM[36] == $level)
-	  {
-	    $Valid_Level = $level;
-	  }
+				$level_options[$level] = l10n(sprintf('Level %d', $level));
+				if (isset($conf_UAM[36]) and $conf_UAM[36] == $level)
+				{
+						$Valid_Level = $level;
+				}
 
     // Template initialization for unvalidated users level
     // ---------------------------------------------------
     $template->assign(
-      'Valid_Level',
-      array(
-        'Level_options' => $level_options,
-        'Level_selected' => $Valid_Level
-			)
-	  );
+						'Valid_Level',
+								array(
+										'Level_options' => $level_options,
+										'Level_selected' => $Valid_Level
+								)
+				);
   }
 
@@ -532,19 +532,19 @@
   foreach ($conf['available_permission_levels'] as $level)
   {
-    $level_options[$level] = l10n(sprintf('Level %d', $level));
-	  if (isset($conf_UAM[37]) and $conf_UAM[37] == $level)
-	  {
-	    $Downgrade_Level = $level;
-	  }
+				$level_options[$level] = l10n(sprintf('Level %d', $level));
+				if (isset($conf_UAM[37]) and $conf_UAM[37] == $level)
+				{
+						$Downgrade_Level = $level;
+				}
 
     // Template initialization for unvalidated users level
     // ---------------------------------------------------
     $template->assign(
-      'Downgrade_Level',
-      array(
-        'Level_options' => $level_options,
-        'Level_selected' => $Downgrade_Level
-			)
-	  );
+						'Downgrade_Level',
+								array(
+										'Level_options' => $level_options,
+										'Level_selected' => $Downgrade_Level
+								)
+				);
   }
 
@@ -570,156 +570,156 @@
 
   $template->assign(
-    array(
-    'nb_para'                           => $nb_para,
-    'nb_para2'                          => $nb_para2,
-    'UAM_VERSION'                       => $version,
-    'UAM_PATH'                          => UAM_PATH,
-    'UAM_DUMP_DOWNLOAD'                 => $dump_download,
-    'UAM_THEME'                         => $UAM_theme,
-		'UAM_MAIL_INFO_TRUE'                => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
-		'UAM_MAIL_INFO_FALSE'               => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILINFO_TEXT'                 => $conf_UAM[8],
-		'UAM_USERNAME_CHAR_TRUE'            => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_FALSE'           => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_LIST'            => $conf_UAM[6],
-		'UAM_CONFIRM_MAIL_TRUE'             => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRM_MAIL_FALSE'            => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
-    'UAM_CONFIRM_MAIL_LOCAL'            => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_TEXT'              => $conf_UAM[9],
-		'UAM_No_Confirm_Group'              => $conf_UAM[2],
-		'UAM_Validated_Group'               => $conf_UAM[3],
-		'UAM_No_Confirm_Status'             => $conf_UAM[7],
-		'UAM_Validated_Status'              => $conf_UAM[4],
-		'UAM_MAILEXCLUSION_TRUE'            => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_LIST'            => $conf_UAM[11],
-		'UAM_PASSWORDENF_TRUE'              => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORDENF_FALSE'             => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORD_SCORE'                => $conf_UAM[13],
-    'UAM_ADMINPASSWENF_TRUE'            => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
-		'UAM_ADMINPASSWENF_FALSE'           => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_TRUE'              => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
-		'UAM_GHOSTRACKER_FALSE'             => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_DAYLIMIT'          => $conf_UAM[16],
-    'UAM_GHOSTRACKER_REMINDERTEXT'      => $conf_UAM[17],
-    'UAM_ADDLASTVISIT_TRUE'             => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADDLASTVISIT_FALSE'            => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_TRUE'            => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_FALSE'           => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_TRUE'           => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_FALSE'          => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_TRUE'                   => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_FALSE'                  => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_TRUE'               => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_FALSE'              => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTODEL_TEXT'                => $conf_UAM[23],
-    'UAM_GTAUTOMAILTEXT'                => $conf_UAM[24],
-		'UAM_Downgrade_Group'               => $conf_UAM[25],
-		'UAM_Downgrade_Status'              => $conf_UAM[26],
-    'UAM_ADMINVALIDATIONMAIL_TEXT'      => $conf_UAM[27],
-    'UAM_CUSTOMPASSWRETR_TRUE'          => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_FALSE'         => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_TEXT'          => $conf_UAM[29],
-    'UAM_USRAUTO_TRUE'                  => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTO_FALSE'                 => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTODEL_TEXT'               => $conf_UAM[31],
-    'UAM_USRAUTOMAIL_TRUE'              => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTOMAIL_FALSE'             => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_TRUE'                   => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_FALSE'                  => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
-		'UAM_NO_VALID_LEVEL'                => $conf_UAM[35],
-		'UAM_VALID_LEVEL'                   => $conf_UAM[36],
-    'UAM_DOWNGRADE_LEVEL'               => $conf_UAM[37],
-    'UAM_PWDRESET_TRUE'                 => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
-    'UAM_PWDRESET_FALSE'                => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_TRUE'            => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_FALSE'           => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_TEXT'            => $conf_UAM[40],
-    'UAM_CONFIRMMAIL_SUBJECT'           => $conf_UAM[41],
-    'UAM_CONFIRMMAIL_REMAIL_SUBJECT'    => $conf_UAM[42],
-    'UAM_INFOMAIL_SUBJECT'              => $conf_UAM[43],
-    'UAM_GTAUTOMAIL_SUBJECT'            => $conf_UAM[44],
-    'UAM_GTREMINDER_SUBJECT'            => $conf_UAM[45],
-    'UAM_ADMINVALIDATIONMAIL_SUBJECT'   => $conf_UAM[46],
-		'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
-    'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
-    'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
-    'UAM_ERROR_REPORTS3'                => $UAM_Illegal_Flag_Error2,
-    'UAM_ERROR_REPORTS4'                => $UAM_Illegal_Flag_Error3,
-    'UAM_EMAIL_MANDATORY'               => $UAM_Email_Mandatory_Check,
-		'UAM_CONFIRMMAIL_TIMEOUT_TRUE'	    => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_TIMEOUT_FALSE'     => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_DELAY'					    => $conf_UAM_ConfirmMail[1],
-    'UAM_CONFIRMMAIL_REMAIL_TRUE'       => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
-    'UAM_CONFIRMMAIL_REMAIL_FALSE'      => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
-    'UAM_CONFIRMMAIL_REMAIL_TXT1'       => $conf_UAM_ConfirmMail[2],
-    'UAM_CONFIRMMAIL_REMAIL_TXT2'       => $conf_UAM_ConfirmMail[4],
-    'UAM_CONFIRMMAIL_CUSTOM_TXT1'       => $conf_UAM_ConfirmMail[5],
-    'UAM_CONFIRMMAIL_CUSTOM_TXT2'       => $conf_UAM_ConfirmMail[6],
+				array(
+						'nb_para'                           => $nb_para,
+    		'nb_para2'                          => $nb_para2,
+    		'UAM_VERSION'                       => $version,
+    		'UAM_PATH'                          => UAM_PATH,
+    		'UAM_DUMP_DOWNLOAD'                 => $dump_download,
+    		'UAM_THEME'                         => $UAM_theme,
+						'UAM_MAIL_INFO_TRUE'                => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
+						'UAM_MAIL_INFO_FALSE'               => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
+						'UAM_MAILINFO_TEXT'                 => $conf_UAM[8],
+						'UAM_USERNAME_CHAR_TRUE'            => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
+						'UAM_USERNAME_CHAR_FALSE'           => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
+						'UAM_USERNAME_CHAR_LIST'            => $conf_UAM[6],
+						'UAM_CONFIRM_MAIL_TRUE'             => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
+						'UAM_CONFIRM_MAIL_FALSE'            => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
+   			'UAM_CONFIRM_MAIL_LOCAL'            => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
+						'UAM_CONFIRMMAIL_TEXT'              => $conf_UAM[9],
+						'UAM_No_Confirm_Group'              => $conf_UAM[2],
+						'UAM_Validated_Group'               => $conf_UAM[3],
+						'UAM_No_Confirm_Status'             => $conf_UAM[7],
+						'UAM_Validated_Status'              => $conf_UAM[4],
+						'UAM_MAILEXCLUSION_TRUE'            => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
+						'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
+						'UAM_MAILEXCLUSION_LIST'            => $conf_UAM[11],
+						'UAM_PASSWORDENF_TRUE'              => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
+						'UAM_PASSWORDENF_FALSE'             => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
+						'UAM_PASSWORD_SCORE'                => $conf_UAM[13],
+   			'UAM_ADMINPASSWENF_TRUE'            => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
+						'UAM_ADMINPASSWENF_FALSE'           => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_GHOSTRACKER_TRUE'              => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
+						'UAM_GHOSTRACKER_FALSE'             => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_GHOSTRACKER_DAYLIMIT'          => $conf_UAM[16],
+    		'UAM_GHOSTRACKER_REMINDERTEXT'      => $conf_UAM[17],
+    		'UAM_ADDLASTVISIT_TRUE'             => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_ADDLASTVISIT_FALSE'            => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_ADMINCONFMAIL_TRUE'            => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_ADMINCONFMAIL_FALSE'           => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_REDIRTOPROFILE_TRUE'           => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_REDIRTOPROFILE_FALSE'          => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_GTAUTO_TRUE'                   => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_GTAUTO_FALSE'                  => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_GTAUTOMAIL_TRUE'               => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_GTAUTOMAIL_FALSE'              => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_GTAUTODEL_TEXT'                => $conf_UAM[23],
+    		'UAM_GTAUTOMAILTEXT'                => $conf_UAM[24],
+						'UAM_Downgrade_Group'               => $conf_UAM[25],
+						'UAM_Downgrade_Status'              => $conf_UAM[26],
+    		'UAM_ADMINVALIDATIONMAIL_TEXT'      => $conf_UAM[27],
+    		'UAM_CUSTOMPASSWRETR_TRUE'          => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_CUSTOMPASSWRETR_FALSE'         => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_CUSTOMPASSWRETR_TEXT'          => $conf_UAM[29],
+    		'UAM_USRAUTO_TRUE'                  => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_USRAUTO_FALSE'                 => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_USRAUTODEL_TEXT'               => $conf_UAM[31],
+    		'UAM_USRAUTOMAIL_TRUE'              => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_USRAUTOMAIL_FALSE'             => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_STUFFS_TRUE'                   => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_STUFFS_FALSE'                  => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_HIDEPASSW_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_HIDEPASSW_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
+						'UAM_NO_VALID_LEVEL'                => $conf_UAM[35],
+						'UAM_VALID_LEVEL'                   => $conf_UAM[36],
+    		'UAM_DOWNGRADE_LEVEL'               => $conf_UAM[37],
+    		'UAM_PWDRESET_TRUE'                 => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_PWDRESET_FALSE'                => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_REJECTCONNECT_TRUE'            => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
+    		'UAM_REJECTCONNECT_FALSE'           => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
+    		'UAM_REJECTCONNECT_TEXT'            => $conf_UAM[40],
+    		'UAM_CONFIRMMAIL_SUBJECT'           => $conf_UAM[41],
+    		'UAM_CONFIRMMAIL_REMAIL_SUBJECT'    => $conf_UAM[42],
+    		'UAM_INFOMAIL_SUBJECT'              => $conf_UAM[43],
+    		'UAM_GTAUTOMAIL_SUBJECT'            => $conf_UAM[44],
+    		'UAM_GTREMINDER_SUBJECT'            => $conf_UAM[45],
+    		'UAM_ADMINVALIDATIONMAIL_SUBJECT'   => $conf_UAM[46],
+						'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
+    		'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
+    		'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
+    		'UAM_ERROR_REPORTS3'                => $UAM_Illegal_Flag_Error2,
+    		'UAM_ERROR_REPORTS4'                => $UAM_Illegal_Flag_Error3,
+    		'UAM_EMAIL_MANDATORY'               => $UAM_Email_Mandatory_Check,
+						'UAM_CONFIRMMAIL_TIMEOUT_TRUE'	    => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
+						'UAM_CONFIRMMAIL_TIMEOUT_FALSE'     => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
+						'UAM_CONFIRMMAIL_DELAY'					    => $conf_UAM_ConfirmMail[1],
+    		'UAM_CONFIRMMAIL_REMAIL_TRUE'       => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
+    		'UAM_CONFIRMMAIL_REMAIL_FALSE'      => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
+    		'UAM_CONFIRMMAIL_REMAIL_TXT1'       => $conf_UAM_ConfirmMail[2],
+    		'UAM_CONFIRMMAIL_REMAIL_TXT2'       => $conf_UAM_ConfirmMail[4],
+    		'UAM_CONFIRMMAIL_CUSTOM_TXT1'       => $conf_UAM_ConfirmMail[5],
+    		'UAM_CONFIRMMAIL_CUSTOM_TXT2'       => $conf_UAM_ConfirmMail[6],
     )
   );
 
   if (isset($_POST['audit']))
-	{
-		$msg_error1 = '';
+		{
+				$msg_error1 = '';
 		
     // Username without forbidden keys
     // -------------------------------
     if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' )
-	  {
-			$query = "
-SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
-  FROM ".USERS_TABLE."
-;";
+	  	{
+						$query = '
+SELECT '.$conf['user_fields']['username'].', '.$conf['user_fields']['email'].'
+		FROM '.USERS_TABLE.'
+;';
 			  
-			$result = pwg_query($query);
+						$result = pwg_query($query);
 			
-			while($row = pwg_db_fetch_assoc($result))
-			{
-				if (!ValidateUsername(stripslashes($row['username'])))
-					$msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
-			}
-		}
-
-		$msg_error2 = '';
+						while($row = pwg_db_fetch_assoc($result))
+						{
+								if (!ValidateUsername(stripslashes($row['username'])))
+										$msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
+						}
+				}
+
+				$msg_error2 = '';
 		
     // Email without forbidden domain
     // ------------------------------
     if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' )
-	  {
-			$query = "
-SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
-  FROM ".USERS_TABLE."
-;";
+						{
+								$query = '
+SELECT '.$conf['user_fields']['username'].', '.$conf['user_fields']['email'].'
+  FROM '.USERS_TABLE.'
+;';
 			  
-		  $result = pwg_query($query);
+		  				$result = pwg_query($query);
 			
-		  while($row = pwg_db_fetch_assoc($result))
-		  {
-			  $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
-			  for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
-			  {
-					$pattern = '/'.$conf_MailExclusion[$i].'/';
-				  if (preg_match($pattern, $row['mail_address']))
-				  {
-						$msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
-					}
-				}
-			}
-		}
+		  				while($row = pwg_db_fetch_assoc($result))
+		  				{
+			  					$conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
+			  					for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
+			  					{
+												$pattern = '/'.$conf_MailExclusion[$i].'/';
+				  						if (preg_match($pattern, $row['mail_address']))
+				  						{
+														$msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
+												}
+										}
+								}
+						}
 		
-    if ($msg_error1 <> '')
-			$errors[] = $msg_error1.'<br><br>';
+    		if ($msg_error1 <> '')
+								$errors[] = $msg_error1.'<br><br>';
 		
-		if ($msg_error2 <> '')
-			$errors[] = $msg_error2.'<br><br>';
+						if ($msg_error2 <> '')
+								$errors[] = $msg_error2.'<br><br>';
 		
-		if ($msg_error1 <> '' or $msg_error2 <> '')
-	  	array_push($page['errors'], l10n('UAM_Err_audit_advise'));
-		else
-    	array_push($page['infos'], l10n('UAM_audit_ok'));
-	}
+						if ($msg_error1 <> '' or $msg_error2 <> '')
+	  					array_push($page['errors'], l10n('UAM_Err_audit_advise'));
+						else
+    				array_push($page['infos'], l10n('UAM_audit_ok'));
+  }
 
 
@@ -727,12 +727,12 @@
 // |                             errors display                            |
 // +-----------------------------------------------------------------------+
-  if (isset ($errors) and count($errors) != 0)
+		if (isset ($errors) and count($errors) != 0)
   {
-	  $template->assign('errors',array());
-	  foreach ($errors as $error)
-	  {
-		  array_push($page['errors'], $error);
-		}
-	}  
+				$template->assign('errors',array());
+	  	foreach ($errors as $error)
+	  	{
+		  		array_push($page['errors'], $error);
+				}
+		}  
 
 // +-----------------------------------------------------------------------+
@@ -760,15 +760,15 @@
 // +-----------------------------------------------------------------------+
 
-		if (!defined('PHPWG_ROOT_PATH'))
-    {
-    	die('Hacking attempt!');
-    }
+				if (!defined('PHPWG_ROOT_PATH'))
+  		{
+  				die('Hacking attempt!');
+  		}
           
-    include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+  		include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 
 // +-----------------------------------------------------------------------+
 // | Check Access and exit when user status is not ok                      |
 // +-----------------------------------------------------------------------+
-		check_status(ACCESS_ADMINISTRATOR);
+				check_status(ACCESS_ADMINISTRATOR);
 
 
@@ -777,5 +777,5 @@
 // +-----------------------------------------------------------------------+
 
-		$page['filtered_users'] = get_user_list();
+				$page['filtered_users'] = get_user_list();
 
 // +-----------------------------------------------------------------------+
@@ -783,89 +783,92 @@
 // +-----------------------------------------------------------------------+
 
-    $visible_user_list = array();
-    foreach ($page['filtered_users'] as $num => $local_user)
-    {
-      $visible_user_list[] = $local_user;
+				$visible_user_list = array();
+  		foreach ($page['filtered_users'] as $num => $local_user)
+  		{
+  				$visible_user_list[] = $local_user;
+				}
+
+				foreach ($visible_user_list as $local_user)
+  	{
+  				// 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(' ', $local_user['lastvisit']); // 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
+  
+						if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
+    		{
+    				if ($deltadays <= ($conf_UAM[16]/2))
+      		{
+      				$display = 'green';
+      		}
+
+								if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16]))
+      		{
+      				$display = 'orange';
+      		}
+
+      		if ($deltadays >= $conf_UAM[16])
+      		{
+      				$display = 'red';
+     			}
+						}
+    		else $display = '';
+
+    		// Template initialization
+    		// -----------------------
+   			$template->append(
+    				'users',
+      				array(
+       					'ID'          => $local_user['id'],
+         			'USERNAME'    => stripslashes($local_user['username']),
+												'EMAIL'       => get_email_address_as_display_text($local_user['email']),
+          		'LASTVISIT'   => $local_user['lastvisit'],
+          		'DAYS'        => $deltadays,
+          		'DISPLAY'     => $display,
+										)
+						);
+				}
+
+				// Plugin version inserted
+  		// -----------------------
+  		$template->assign(
+  				array(
+    				'UAM_VERSION'  => $version,
+      		'UAM_PATH'     => UAM_PATH,
+    		)
+  		);
+    
+// +-----------------------------------------------------------------------+
+// |                             errors display                            |
+// +-----------------------------------------------------------------------+
+				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__) . '/template/userlist.tpl');
+  		$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
 		}
-
-		foreach ($visible_user_list as $local_user)
-    {
-      // 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(' ', $local_user['lastvisit']); // 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
-      
-      if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
-      {
-        if ($deltadays <= ($conf_UAM[16]/2))
-        {
-          $display = 'green';
-        }
-        
-        if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16]))
-        {
-          $display = 'orange';
-        }
-        
-        if ($deltadays >= $conf_UAM[16])
-        {
-          $display = 'red';
-        }
-      }
-      else $display = '';
-
-      // Template initialization
-      // -----------------------
-   		$template->append(
-     		'users',
-       	array(
-       		'ID'          => $local_user['id'],
-         	'USERNAME'    => stripslashes($local_user['username']),
-					'EMAIL'       => get_email_address_as_display_text($local_user['email']),
-          'LASTVISIT'   => $local_user['lastvisit'],
-          'DAYS'        => $deltadays,
-          'DISPLAY'     => $display,
-				)
-			);
+		else
+		{
+				array_push($page['errors'], l10n('UAM_Err_Userlist_Settings'));
 		}
-    // Plugin version inserted
-    // -----------------------
-    $template->assign(
-      array(
-        'UAM_VERSION'  => $version,
-        'UAM_PATH'     => UAM_PATH,
-      )
-    );    
-// +-----------------------------------------------------------------------+
-// |                             errors display                            |
-// +-----------------------------------------------------------------------+
-		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__) . '/template/userlist.tpl');
-    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
-  }
-  else
-  {
-		array_push($page['errors'], l10n('UAM_Err_Userlist_Settings'));
-  }
-  break;
+
+break;
 
 
@@ -881,5 +884,5 @@
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
 	
-  if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[7]) and $conf_UAM[7] <> '-1')))
+  if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local'))
   {
 // +-----------------------------------------------------------------------+
@@ -887,7 +890,7 @@
 // +-----------------------------------------------------------------------+
 
-		if (!defined('PHPWG_ROOT_PATH'))
+				if (!defined('PHPWG_ROOT_PATH'))
     {
-    	die('Hacking attempt!');
+    		die('Hacking attempt!');
     }
 
@@ -897,5 +900,5 @@
 // | Check Access and exit when user status is not ok                      |
 // +-----------------------------------------------------------------------+
-		check_status(ACCESS_ADMINISTRATOR);
+				check_status(ACCESS_ADMINISTRATOR);
 
 // +-----------------------------------------------------------------------+
@@ -903,85 +906,85 @@
 // +-----------------------------------------------------------------------+
 
-		$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]);
+        		}
+     			}
+						}
+				}
 
 // +-----------------------------------------------------------------------+
@@ -991,81 +994,81 @@
 // |                            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('UAM_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('UAM_No_validation_for_default_user'));
-    	}
-   		if (in_array($conf['webmaster_id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
-    	}
-    	if (in_array($user['id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
-    	}
-
-    	if (count($page['errors']) == 0)
-    	{
-    		foreach ($collection as $user_id)
-      	{     	
-      		$typemail = 1;
-				  $query = "
+				if (isset($_POST['Mail_With_Key']) and count($collection) > 0)
+				{
+						if (in_array($conf['guest_id'], $collection))
+   			{
+    				array_push($page['errors'], l10n('UAM_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('UAM_No_validation_for_default_user'));
+   			}
+   			if (in_array($conf['webmaster_id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
+    		}
+    		if (in_array($user['id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_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 = pwg_db_fetch_assoc(pwg_query($query));
+  FROM '.USERS_TABLE.'
+WHERE id = '.$user_id.'
+;';
+										$data = pwg_db_fetch_assoc(pwg_query($query));
 				
-      		ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],true);
-      	}
-      	array_push(
-      		$page['infos'],
-        	l10n_dec(
-        		'UAM_%d_Mail_With_Key', 'UAM_%d_Mails_With_Key',
-        	count($collection)
-        	)
-      	);
+      				ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],true);
+      		}
+      		array_push(
+      				$page['infos'],
+       					l10n_dec(
+        				'UAM_%d_Mail_With_Key', 'UAM_%d_Mails_With_Key',
+        				count($collection)
+        				)
+      				);
       	
-				$page['filtered_users'] = get_unvalid_user_list();
-			}
-		}
+								$page['filtered_users'] = get_unvalid_user_list();
+						}
+				}
 
 // +-----------------------------------------------------------------------+
@@ -1075,159 +1078,159 @@
 // |                            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('UAM_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('UAM_No_validation_for_default_user'));
-    	}
-   		if (in_array($conf['webmaster_id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
-    	}
-    	if (in_array($user['id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
-    	}
-
-    	if (count($page['errors']) == 0)
-    	{
-    		foreach ($collection as $user_id)
-      	{
-      		$typemail = 2;
-				  $query = "
+				if (isset($_POST['Mail_Without_Key']) and count($collection) > 0)
+				{
+						if (in_array($conf['guest_id'], $collection))
+   			{
+    				array_push($page['errors'], l10n('UAM_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('UAM_No_validation_for_default_user'));
+    		}
+   			if (in_array($conf['webmaster_id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
+    		}
+    		if (in_array($user['id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_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."'
-;";
+  FROM '.USERS_TABLE.'
+WHERE id = '.$user_id.'
+;';
 					
-					$data = pwg_db_fetch_assoc(pwg_query($query));
+										$data = pwg_db_fetch_assoc(pwg_query($query));
 				
-      		ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],false);				
-      	}
-      	array_push(
-      		$page['infos'],
-        	l10n_dec(
-        		'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
-       		count($collection)
-        	)
-      	);
+      				ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],false);				
+      		}
+      		array_push(
+      				$page['infos'],
+       			l10n_dec(
+       			'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
+       			count($collection)
+        		)
+      		);
         
-				$page['filtered_users'] = get_unvalid_user_list();
-			}
-		}
-
+								$page['filtered_users'] = get_unvalid_user_list();
+						}
+				}
+
+// +-----------------------------------------------------------------------+
+// |             								 Manual validation	by admins 				                 |
+// +-----------------------------------------------------------------------+
+// +-----------------------------------------------------------------------+
+// |                            selected users                             |
+// +-----------------------------------------------------------------------+
+				if (isset($_POST['Manual_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					                 |
 // +-----------------------------------------------------------------------+
-// +-----------------------------------------------------------------------+
-// |                            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('UAM_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('UAM_No_validation_for_default_user'));
-    	}
-   		if (in_array($conf['webmaster_id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
-    	}
-    	if (in_array($user['id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
-    	}
-
-    	if (count($page['errors']) == 0)
-    	{
-    		foreach ($collection as $user_id)
-      	{
-          ForceValidation($user_id);
+				if (isset($_POST['Manual_Validation']) and count($collection) > 0)
+				{
+						if (in_array($conf['guest_id'], $collection))
+   			{
+    				array_push($page['errors'], l10n('UAM_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('UAM_No_validation_for_default_user'));
+    		}
+  				if (in_array($conf['webmaster_id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
+    		}
+    		if (in_array($user['id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
+    		}
+
+    		if (count($page['errors']) == 0)
+    		{
+    				foreach ($collection as $user_id)
+      		{
+        		ManualValidation($user_id);
           validation_mail($user_id);
-      	}
-      	array_push(
-      		$page['infos'],
-        	l10n_dec(
+      		}
+      		array_push(
+      				$page['infos'],
+       			l10n_dec(
         		'UAM_%d_Validated_User', 'UAM_%d_Validated_Users',
-       		count($collection)
-        	)
-      	);
-
-				$page['filtered_users'] = get_unvalid_user_list();
-			}
-		}
+       			count($collection)
+        		)
+      		);
+
+								$page['filtered_users'] = get_unvalid_user_list();
+						}
+				}
 		
 
@@ -1236,5 +1239,5 @@
 // +-----------------------------------------------------------------------+
 
-		$groups[-1] = '------------';
+				$groups[-1] = '------------';
 
     $query = '
@@ -1244,9 +1247,9 @@
 ;';
 
-		$result = pwg_query($query);
+				$result = pwg_query($query);
           
     while ($row = pwg_db_fetch_assoc($result))
     {
-      $groups[$row['id']] = $row['name'];
+    		$groups[$row['id']] = $row['name'];
     }
 
@@ -1255,17 +1258,17 @@
 // +-----------------------------------------------------------------------+
 
-		$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();
     foreach ($page['filtered_users'] as $num => $local_user)
     {
-      $visible_user_list[] = $local_user;
-		}
-
-		foreach ($visible_user_list as $local_user)
+    		$visible_user_list[] = $local_user;
+				}
+
+				foreach ($visible_user_list as $local_user)
     {
-      $groups_string = preg_replace(
-      	'/(\d+)/e',
+    		$groups_string = preg_replace(
+      		'/(\d+)/e',
         "\$groups['$1']",
         implode(
@@ -1273,5 +1276,5 @@
             $local_user['groups']
          )
-			);
+						);
 
       $query = '
@@ -1294,36 +1297,36 @@
 
 
-	  	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');
-
-			$expiration = expiration($local_user['id']);
+	  			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');
+
+						$expiration = expiration($local_user['id']);
 
       // Template initialization
       // -----------------------
-   		$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'         => stripslashes($local_user['username'])
+   			$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'         => stripslashes($local_user['username'])
                                   .($local_user['id'] == $conf['guest_id']
                                   ? '<BR>['.l10n('is_the_guest').']' : '')
@@ -1332,12 +1335,12 @@
                                   'STATUS' => l10n('user_status_'
                                   .$local_user['status']),
-					'EMAIL'            => get_email_address_as_display_text($local_user['email']),
-         	'GROUPS'           => $groups_string,
-         	'REGISTRATION'     => $local_user['registration_date'],
-          'REMINDER'         => $reminder,    
-         	'EXPIRATION'       => $expiration,
-				)
-			);
-		}   
+												'EMAIL'            => get_email_address_as_display_text($local_user['email']),
+         			'GROUPS'           => $groups_string,
+         			'REGISTRATION'     => $local_user['registration_date'],
+          		'REMINDER'         => $reminder,    
+         			'EXPIRATION'       => $expiration,
+										)
+						);
+				}   
 
     // Check if validation of register is made by admin or visitor 
@@ -1358,5 +1361,5 @@
     // -----------------------
     $template->assign(
-      array(
+    		array(
         'CONFIRM_LOCAL'=> $Confirm_Local,
         'UAM_VERSION'  => $version,
@@ -1368,22 +1371,22 @@
 // |                             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__) . '/template/usermanager.tpl');
-    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
-	}
+				$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/usermanager.tpl');
+  		$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
+		}
   else
   {
-		array_push($page['errors'], l10n('UAM_Err_UserManager_Settings'));
+				array_push($page['errors'], l10n('UAM_Err_UserManager_Settings'));
   }
   break;
@@ -1395,5 +1398,5 @@
 // +-----------------------------------------------------------------------+
 // *************************************************************************
-  case 'ghosttracker':
+		case 'ghosttracker':
 
   $conf_UAM = unserialize($conf['UserAdvManager']);
@@ -1405,15 +1408,15 @@
 // +-----------------------------------------------------------------------+
 
-		if (!defined('PHPWG_ROOT_PATH'))
-    {
-    	die('Hacking attempt!');
-    }
+				if (!defined('PHPWG_ROOT_PATH'))
+  		{
+  				die('Hacking attempt!');
+  		}
           
-    include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+  		include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 
 // +-----------------------------------------------------------------------+
 // | Check Access and exit when user status is not ok                      |
 // +-----------------------------------------------------------------------+
-		check_status(ACCESS_ADMINISTRATOR);
+				check_status(ACCESS_ADMINISTRATOR);
 
 // +-----------------------------------------------------------------------+
@@ -1421,85 +1424,85 @@
 // +-----------------------------------------------------------------------+
 
-		$page['filtered_users'] = get_ghost_user_list();
+				$page['filtered_users'] = get_ghost_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]);
+        		}
+     			}
+						}
+				}
 
 // +-----------------------------------------------------------------------+
@@ -1509,85 +1512,85 @@
 // |                            selected users                             |
 // +-----------------------------------------------------------------------+
-		if (isset($_POST['Reminder_Email']))
-		{
-  		$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['Reminder_Email']))
+				{
+  				$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 ghost reminder                           |
 // +-----------------------------------------------------------------------+
-		if (isset($_POST['Reminder_Email']) and count($collection) > 0)
-		{
-			if (in_array($conf['guest_id'], $collection))
-   		{
-    		array_push($page['errors'], l10n('UAM_No_reminder_for_Guest'));
-    	}
-    	if (($conf['guest_id'] != $conf['default_user_id']) and
-    		in_array($conf['default_user_id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_reminder_for_default_user'));
-    	}
-   		if (in_array($conf['webmaster_id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_reminder_for_Webmaster'));
-    	}
-    	if (in_array($user['id'], $collection))
-    	{
-    		array_push($page['errors'], l10n('UAM_No_reminder_for_your_account'));
-    	}
-
-    	if (count($page['errors']) == 0)
-    	{
-    		foreach ($collection as $user_id)
-      	{
-				  $query = "
+				if (isset($_POST['Reminder_Email']) and count($collection) > 0)
+				{
+						if (in_array($conf['guest_id'], $collection))
+   			{
+    				array_push($page['errors'], l10n('UAM_No_reminder_for_Guest'));
+   			}
+    		if (($conf['guest_id'] != $conf['default_user_id']) and
+    				in_array($conf['default_user_id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_reminder_for_default_user'));
+    		}
+   			if (in_array($conf['webmaster_id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_reminder_for_Webmaster'));
+    		}
+    		if (in_array($user['id'], $collection))
+    		{
+    				array_push($page['errors'], l10n('UAM_No_reminder_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."'
-;";
+  FROM '.USERS_TABLE.'
+WHERE id = '.$user_id.'
+;';
 					
-					$data = pwg_db_fetch_assoc(pwg_query($query));
+										$data = pwg_db_fetch_assoc(pwg_query($query));
 				
-      		ghostreminder($user_id,stripslashes($data['username']),$data['mail_address']);				
-      	}
-      	array_push(
-      		$page['infos'],
-        	l10n_dec(
-        		'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
-       		count($collection)
-        	)
-      	);
-      	
-				$page['filtered_users'] = get_ghost_user_list();
-			}
-		}
+      				ghostreminder($user_id,stripslashes($data['username']),$data['mail_address']);				
+      		}
+      		array_push(
+      				$page['infos'],
+        		l10n_dec(
+       			'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
+       			count($collection)
+        		)
+      		);
+
+								$page['filtered_users'] = get_ghost_user_list();
+						}
+				}
     
     if (isset($_POST['GhostTracker_Init']) and is_admin()) //Reset is only allowed for admins !
     {
-      $query1 = '
+    		$query1 = '
 SELECT *
   FROM '.USER_LASTVISIT_TABLE.';';
@@ -1597,5 +1600,5 @@
       if ($count <> 0)
       {
-        $query = '
+      		$query = '
 SELECT DISTINCT u.id,
                 ui.status AS status
@@ -1616,8 +1619,9 @@
           list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
             
-          $query = "
-INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
-VALUES ('".$row['id']."','".$dbnow."','false')
-;";
+          $query = '
+INSERT INTO '.USER_LASTVISIT_TABLE.'
+				(user_id, lastvisit, reminder)
+VALUES ('.$row['id'].',"'.$dbnow.'","false")
+;';
           pwg_query($query);
         }
@@ -1643,8 +1647,9 @@
           list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
             
-          $query = "
-INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
-VALUES ('".$row['id']."','".$dbnow."','false')
-;";
+          $query = '
+INSERT INTO '.USER_LASTVISIT_TABLE.'
+    (user_id, lastvisit, reminder)
+VALUES ('.$row['id'].',"'.$dbnow.'","false")
+;';
           pwg_query($query);
         }
@@ -1662,9 +1667,9 @@
     {
       $visible_user_list[] = $local_user;
-		}
+				}
     
-		foreach ($visible_user_list as $local_user)
-    {
-      $reminder = '';
+				foreach ($visible_user_list as $local_user)
+   	{
+    		$reminder = '';
     
       if (isset($local_user['reminder']) and $local_user['reminder'] == 'true')
@@ -1678,11 +1683,11 @@
     
       if (isset($_POST['pref_submit']) and isset($_POST['selection']) and in_array($local_user['id'], $_POST['selection']))
-	  	{
-				$checked = 'checked="checked"';
-	  	}
-			else
-    	{
-    		$checked = '';
-    	}
+	  			{
+								$checked = 'checked="checked"';
+	  			}
+						else
+    		{
+    				$checked = '';
+   			}
 
       // Template initialization
@@ -1691,13 +1696,13 @@
      	  'users',
        	array(
-       		'ID'          => $local_user['id'],
+       			'ID'          => $local_user['id'],
          	'CHECKED'     => $checked,
          	'USERNAME'    => stripslashes($local_user['username']),
-					'EMAIL'       => get_email_address_as_display_text($local_user['email']),
+										'EMAIL'       => get_email_address_as_display_text($local_user['email']),
           'LASTVISIT'   => $local_user['lastvisit'],
           'REMINDER'    => $reminder,
-				)
-			);
-		}
+								)
+						);
+				}
 
     // Plugin version inserted
@@ -1713,22 +1718,22 @@
 // |                             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__) . '/template/ghosttracker.tpl');
+				$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/ghosttracker.tpl');
     $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');		
-	}
+		}
   else
   {
-		array_push($page['errors'], l10n('UAM_Err_GhostTracker_Settings'));
+				array_push($page['errors'], l10n('UAM_Err_GhostTracker_Settings'));
   }
 
Index: /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl
===================================================================
--- /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl	(revision 17917)
+++ /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl	(revision 17918)
@@ -96,10 +96,10 @@
 {if $CONFIRM_LOCAL == "local"}
   <input class="submit" type="submit" value="{'UAM_Delete_selected'|@translate}" name="Del_Selected">
-  <input class="submit" type="submit" value="{'UAM_Force_Validation'|@translate}" name="Force_Validation">
+  <input class="submit" type="submit" value="{'UAM_Manual_Validation'|@translate}" name="Manual_Validation">
 {else}
   <input class="submit" type="submit" value="{'UAM_Delete_selected'|@translate}" name="Del_Selected">
   <input class="submit" type="submit" value="{'UAM_Mail_without_key'|@translate}" name="Mail_Without_Key">
   <input class="submit" type="submit" value="{'UAM_Mail_with_key'|@translate}" name="Mail_With_Key">
-  <input class="submit" type="submit" value="{'UAM_Force_Validation'|@translate}" name="Force_Validation">
+  <input class="submit" type="submit" value="{'UAM_Manual_Validation'|@translate}" name="Manual_Validation">
 {/if}
 </p>
Index: /extensions/UserAdvManager/trunk/include/functions.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/functions.inc.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/include/functions.inc.php	(revision 17918)
@@ -136,4 +136,8 @@
       // ----------------------------------------------------------------------------------------------
       SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation
+      
+      // This is to set UAM_validated field to false in #_users table - Usefull if no "waiting" group or status is set
+      // -------------------------------------------------------------------------------------------------------------
+      SetUnvalidated($register_user['id']);
     }
     // Sending registration confirmation by email
@@ -262,8 +266,8 @@
       $user_idsOK[] = $user['id'];
 
-      $query = "
-UPDATE ".CONFIG_TABLE."
-SET value = \"".implode(',', $user_idsOK)."\"
-WHERE param = 'UserAdvManager_Redir';";
+      $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.implode(',', $user_idsOK).'"
+WHERE param = "UserAdvManager_Redir";';
           
       pwg_query($query);
@@ -318,5 +322,5 @@
     if (!empty($_POST['use_new_pwd']))
     {
-      $typemail = 2; // Confirmation email on user profile update - With information email if checked
+      $typemail = 2; // Confirmation email on user profile update - With information email
 
       // Password enforcement control
@@ -357,4 +361,5 @@
         {
           SetPermission($user['id']);// Set to "waiting" group or status until user validation
+          SetUnvalidated($user['id']); // Set UAM_validated field to false in #_users table
           $confirm_mail_need = true;
         }
@@ -365,4 +370,5 @@
         {
           SetPermission($user['id']);// Set to "waiting" group or status until admin validation
+          SetUnvalidated($user['id']); // Set UAM_validated field to false in #_users table
           $confirm_mail_need = false;
         }       
@@ -586,9 +592,9 @@
             list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
 
-		        $query = "
-UPDATE ".USER_LASTVISIT_TABLE."
-SET lastvisit='".$dbnow."'
-WHERE user_id = '".$user_id."'
-;";
+		        $query = '
+UPDATE '.USER_LASTVISIT_TABLE.'
+SET lastvisit="'.$dbnow.'"
+WHERE user_id = '.$user_id.'
+;';
             pwg_query($query);
 
@@ -597,13 +603,13 @@
             // Delete user from all groups
             // ---------------------------
-            $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$user_id."'
+            $query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$user_id.'
   AND (
-    group_id = '".$conf_UAM[2]."'
+    group_id = "'.$conf_UAM[2].'"
   OR 
-    group_id = '".$conf_UAM[3]."'
+    group_id = "'.$conf_UAM[3].'"
   )
-;";
+;';
             pwg_query($query);
 
@@ -612,9 +618,9 @@
             if ($conf_UAM[26] <> -1)
             {
-              $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[26]."'
-WHERE user_id = '".$user_id."'
-;";
+              $query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.$conf_UAM[26].'"
+WHERE user_id = '.$user_id.'
+;';
               pwg_query($query);
             }
@@ -624,10 +630,10 @@
             if ($conf_UAM[25] <> -1)
             {
-              $query = "
-INSERT INTO ".USER_GROUP_TABLE."
+              $query = '
+INSERT INTO '.USER_GROUP_TABLE.'
   (user_id, group_id)
 VALUES
-  ('".$user_id."', '".$conf_UAM[25]."')
-;";
+  ('.$user_id.', "'.$conf_UAM[25].'")
+;';
               pwg_query($query);
             }
@@ -637,9 +643,9 @@
             if ($conf_UAM[37] <> -1)
             {
-              $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET level = '".$conf_UAM[37]."'
-WHERE user_id = '".$user_id."'
-;";
+              $query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET level = "'.$conf_UAM[37].'"
+WHERE user_id = '.$user_id.'
+;';
               pwg_query($query);
             }
@@ -651,9 +657,9 @@
               // Set reminder true
               // -----------------
-              $query = "
-UPDATE ".USER_LASTVISIT_TABLE."
-SET reminder = 'true'
-WHERE user_id = '".$user_id."'
-;";
+              $query = '
+UPDATE '.USER_LASTVISIT_TABLE.'
+SET reminder = "true"
+WHERE user_id = '.$user_id.'
+;';
               pwg_query($query);
             
@@ -663,5 +669,5 @@
 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
 SET date_check = NULL
-WHERE user_id = "'.$user_id.'"
+WHERE user_id = '.$user_id.'
 ;';
 						  pwg_query($query);
@@ -757,9 +763,9 @@
           // Get current user informations
           // -----------------------------
-          $query = "
+          $query = '
 SELECT id, username, mail_address
-FROM ".USERS_TABLE."
-WHERE id = '".$user['id']."'
-;";
+FROM '.USERS_TABLE.'
+WHERE id = '.$user['id'].'
+;';
           $data = pwg_db_fetch_assoc(pwg_query($query));
 
@@ -811,9 +817,9 @@
             // Get current user informations
             // -----------------------------
-            $query = "
+            $query = '
 SELECT id, username, mail_address
-FROM ".USERS_TABLE."
-WHERE id = '".$user_id."'
-;";
+FROM '.USERS_TABLE.'
+WHERE id = '.$user_id.'
+;';
             $data = pwg_db_fetch_assoc(pwg_query($query));
 
@@ -1087,5 +1093,5 @@
   }
 
-  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ?
+  if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ?
   {
     $infos2 = array
@@ -1218,9 +1224,9 @@
 // Set reminder true 
 // -----------------     
-      $query = "
-UPDATE ".USER_CONFIRM_MAIL_TABLE."
-SET reminder = 'true'
-WHERE user_id = '".$user_id."'
-;";
+      $query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET reminder = "true"
+WHERE user_id = '.$user_id.'
+;';
       pwg_query($query);
       
@@ -1270,9 +1276,9 @@
 // Set reminder true
 // -----------------
-      $query = "
-UPDATE ".USER_CONFIRM_MAIL_TABLE."
-SET reminder = 'true'
-WHERE user_id = '".$user_id."'
-;";
+      $query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET reminder = "true"
+WHERE user_id = '.$user_id.'
+;';
       pwg_query($query);
       
@@ -1596,9 +1602,9 @@
   {
     $id = generate_key(16);
-    $query = "
+    $query = '
 SELECT COUNT(*)
-  FROM ".USER_CONFIRM_MAIL_TABLE."
-WHERE id = '".$id."'
-;";
+  FROM '.USER_CONFIRM_MAIL_TABLE.'
+WHERE id = '.$id.'
+;';
     list($count) = pwg_db_fetch_row(pwg_query($query));
 
@@ -1628,30 +1634,30 @@
   if (isset($Confirm_Mail_ID))
   {
-    $query = "
+    $query = '
 SELECT status
-  FROM ".USER_INFOS_TABLE."
-WHERE user_id = '".$user_id."'
-;";
+  FROM '.USER_INFOS_TABLE.'
+WHERE user_id = '.$user_id.'
+;';
     list($status) = pwg_db_fetch_row(pwg_query($query));
     
-    $query = "
-INSERT INTO ".USER_CONFIRM_MAIL_TABLE."
+    $query = '
+INSERT INTO '.USER_CONFIRM_MAIL_TABLE.'
   (id, user_id, mail_address, status, date_check)
 VALUES
-  ('".$Confirm_Mail_ID."', '".$user_id."', '".$email."', '".$status."', null)
-;";
+  ("'.$Confirm_Mail_ID.'", '.$user_id.', "'.$email.'", "'.$status.'", null)
+;';
     pwg_query($query);
 
     // Delete user from all groups
     // ---------------------------
-    $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$user_id."'
+    $query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$user_id.'
   AND (
-    group_id = '".$conf_UAM[2]."'
+    group_id = "'.$conf_UAM[2].'"
   OR 
-    group_id = '".$conf_UAM[3]."'
+    group_id = "'.$conf_UAM[3].'"
   )
-;";
+;';
     pwg_query($query);
 
@@ -1660,9 +1666,9 @@
     if (!is_admin() and $conf_UAM[7] <> -1)
     {
-      $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[7]."'
-WHERE user_id = '".$user_id."'
-;";
+      $query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.$conf_UAM[7].'"
+WHERE user_id = '.$user_id.'
+;';
       pwg_query($query);
     }
@@ -1672,10 +1678,10 @@
     if (!is_admin() and $conf_UAM[2] <> -1)
     {
-      $query = "
-INSERT INTO ".USER_GROUP_TABLE."
+      $query = '
+INSERT INTO '.USER_GROUP_TABLE.'
   (user_id, group_id)
 VALUES
-  ('".$user_id."', '".$conf_UAM[2]."')
-;";
+  ('.$user_id.', "'.$conf_UAM[2].'")
+;';
       pwg_query($query);
     }
@@ -1685,11 +1691,15 @@
     if (!is_admin() and $conf_UAM[35] <> -1)
     {
-      $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET level = '".$conf_UAM[35]."'
-WHERE user_id = '".$user_id."'
-;";
+      $query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET level = "'.$conf_UAM[35].'"
+WHERE user_id = '.$user_id.'
+;';
       pwg_query($query);
     }
+    
+    // Set UAM_validated field to false in #_users table
+    // -------------------------------------------------
+    SetUnvalidated($user_id);
     
     return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID.'&userid='.$user_id;
@@ -1713,22 +1723,22 @@
 // Groups cleanup
 // --------------
-  $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$user_id."'
+  $query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$user_id.'
   AND (
-    group_id = '".$conf_UAM[2]."'
+    group_id = "'.$conf_UAM[2].'"
   OR 
-    group_id = '".$conf_UAM[3]."'
+    group_id = "'.$conf_UAM[3].'"
   )
-;";
+;';
   pwg_query($query);
 
   if (!is_admin() and $conf_UAM[7] <> -1) // Set status
   {
-    $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[7]."'
-WHERE user_id = '".$user_id."'
-;";
+    $query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.$conf_UAM[7].'"
+WHERE user_id = '.$user_id.'
+;';
     pwg_query($query);
   }
@@ -1736,10 +1746,10 @@
   if (!is_admin() and $conf_UAM[2] <> -1) // Set group
   {
-    $query = "
-INSERT INTO ".USER_GROUP_TABLE."
+    $query = '
+INSERT INTO '.USER_GROUP_TABLE.'
   (user_id, group_id)
 VALUES
-  ('".$user_id."', '".$conf_UAM[2]."')
-;";
+  ('.$user_id.', "'.$conf_UAM[2].'")
+;';
     pwg_query($query);
   }
@@ -1747,10 +1757,10 @@
   if (!is_admin() and $conf_UAM[35] <> -1) // Set privacy level
   {
-    $query = "
-INSERT INTO ".USER_INFOS_TABLE."
+    $query = '
+INSERT INTO '.USER_INFOS_TABLE.'
   (user_id, level)
 VALUES
-  ('".$user_id."', '".$conf_UAM[35]."')
-;";
+  ('.$user_id.', "'.$conf_UAM[35].'")
+;';
     pwg_query($query);
   }
@@ -1776,16 +1786,16 @@
   if (isset($Confirm_Mail_ID))
   { 
-    $query = "
-UPDATE ".USER_CONFIRM_MAIL_TABLE."
-SET id = '".$Confirm_Mail_ID."'
-WHERE user_id = '".$user_id."'
-;";
+    $query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET id = "'.$Confirm_Mail_ID.'"
+WHERE user_id = '.$user_id.'
+;';
     pwg_query($query);
 
-		$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET registration_date = '".$dbnow."'
-WHERE user_id = '".$user_id."'
-;";
+		$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET registration_date = "'.$dbnow.'"
+WHERE user_id = '.$user_id.'
+;';
 		pwg_query($query);
     
@@ -1807,9 +1817,9 @@
   list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
 
-  $query = "
-UPDATE ".USER_LASTVISIT_TABLE."
-SET lastvisit = '".$dbnow."', reminder = 'true'
-WHERE user_id = '".$user_id."'
-;";
+  $query = '
+UPDATE '.USER_LASTVISIT_TABLE.'
+SET lastvisit = "'.$dbnow.'", reminder = "true"
+WHERE user_id = '.$user_id.'
+;';
   pwg_query($query);
 }
@@ -1822,8 +1832,8 @@
 function DeleteConfirmMail($user_id)
 {
-  $query = "
-DELETE FROM ".USER_CONFIRM_MAIL_TABLE."
-WHERE user_id = '".$user_id."'
-;";
+  $query = '
+DELETE FROM '.USER_CONFIRM_MAIL_TABLE.'
+WHERE user_id = '.$user_id.'
+;';
   pwg_query($query);
 }
@@ -1835,8 +1845,8 @@
 function DeleteLastVisit($user_id)
 {
-  $query = "
-DELETE FROM ".USER_LASTVISIT_TABLE."
-WHERE user_id = '".$user_id."'
-;";
+  $query = '
+DELETE FROM '.USER_LASTVISIT_TABLE.'
+WHERE user_id = '.$user_id.'
+;';
   pwg_query($query);
 }
@@ -1865,8 +1875,8 @@
   unset($values[array_search($user_id, $values)]);
      
-  $query = "
-UPDATE ".CONFIG_TABLE."
-SET value = \"".implode(',', $values)."\"
-WHERE param = 'UserAdvManager_Redir';";
+  $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.implode(',', $values).'"
+WHERE param = "UserAdvManager_Redir";';
 
   pwg_query($query);
@@ -1893,27 +1903,27 @@
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
 
-  $query = "
+  $query = '
 SELECT COUNT(*)
-FROM ".USER_CONFIRM_MAIL_TABLE."
-WHERE id = '".$id."'
-;";
+FROM '.USER_CONFIRM_MAIL_TABLE.'
+WHERE id = '.$id.'
+;';
   list($count) = pwg_db_fetch_row(pwg_query($query));
 
   if ($count == 1)
   {
-    $query = "
+    $query = '
 SELECT user_id, status, date_check
-FROM ".USER_CONFIRM_MAIL_TABLE."
-WHERE id = '".$id."'
-;";
+FROM '.USER_CONFIRM_MAIL_TABLE.'
+WHERE id = '.$id.'
+;';
     $data = pwg_db_fetch_assoc(pwg_query($query));
 
     if (!empty($data) and isset($data['user_id']) and is_null($data['date_check']))
     {
-      $query = "
+      $query = '
 SELECT registration_date
-FROM ".USER_INFOS_TABLE."
-WHERE user_id = '".$data['user_id']."'
-;";
+FROM '.USER_INFOS_TABLE.'
+WHERE user_id = '.$data['user_id'].'
+;';
       list($registration_date) = pwg_db_fetch_row(pwg_query($query));
 
@@ -1966,9 +1976,9 @@
 						if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
 						{
-							$query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$data['user_id']."'
-  AND group_id = '".$conf_UAM[2]."'
-;";
+							$query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$data['user_id'].'
+  AND group_id = "'.$conf_UAM[2].'"
+;';
 							pwg_query($query);
 						}
@@ -1976,10 +1986,10 @@
 						if ($conf_UAM[3] <> -1) // Add user to validated users group 
 						{
-							$query = "
-INSERT INTO ".USER_GROUP_TABLE."
+							$query = '
+INSERT INTO '.USER_GROUP_TABLE.'
   (user_id, group_id)
 VALUES
-  ('".$data['user_id']."', '".$conf_UAM[3]."')
-;";
+  ('.$data['user_id'].', "'.$conf_UAM[3].'")
+;';
 							pwg_query($query);
 						}
@@ -1987,9 +1997,9 @@
 						if (($conf_UAM[4] <> -1 or isset($data['status']))) // Change user's status
 						{
-							$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".(isset($data['status']) ? $data['status'] : $conf_UAM[4])."'
-WHERE user_id = '".$data['user_id']."'
-;";
+							$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.(isset($data['status']) ? $data['status'] : $conf_UAM[4]).'"
+WHERE user_id = '.$data['user_id'].'
+;';
 							pwg_query($query);
 						}
@@ -1997,9 +2007,9 @@
 						if (($conf_UAM[36] <> -1 or isset($data['level']))) // Change user's privacy level
 						{
-							$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET level = '".(isset($data['level']) ? $data['level'] : $conf_UAM[36])."'
-WHERE user_id = '".$data['user_id']."'
-;";
+							$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET level = "'.(isset($data['level']) ? $data['level'] : $conf_UAM[36]).'"
+WHERE user_id = '.$data['user_id'].'
+;';
 							pwg_query($query);
 						}
@@ -2043,9 +2053,9 @@
 					if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
 					{
-						$query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$data['user_id']."'
-AND group_id = '".$conf_UAM[2]."'
-;";
+						$query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$data['user_id'].'
+AND group_id = "'.$conf_UAM[2].'"
+;';
 						pwg_query($query);
 					}
@@ -2053,17 +2063,17 @@
 					if ($conf_UAM[3] <> -1)
 					{
-						$query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$data['user_id']."'
-AND group_id = '".$conf_UAM[3]."'
-;";
+						$query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$data['user_id'].'
+AND group_id = "'.$conf_UAM[3].'"
+;';
 						pwg_query($query);
 
-						$query = "
-INSERT INTO ".USER_GROUP_TABLE."
+						$query = '
+INSERT INTO '.USER_GROUP_TABLE.'
   (user_id, group_id)
 VALUES
-  ('".$data['user_id']."', '".$conf_UAM[3]."')
-;";
+  ('.$data['user_id'].', "'.$conf_UAM[3].'")
+;';
 						pwg_query($query);
 					}
@@ -2071,9 +2081,9 @@
 					if (($conf_UAM[4] <> -1 or isset($data['status']))) // Change user's status
 					{
-						$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".(isset($data['status']) ? $data['status'] : $conf_UAM[4])."'
-WHERE user_id = '".$data['user_id']."'
-;";
+						$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.(isset($data['status']) ? $data['status'] : $conf_UAM[4]).'"
+WHERE user_id = '.$data['user_id'].'
+;';
 						pwg_query($query);
 					}
@@ -2081,9 +2091,9 @@
 					if (($conf_UAM[36] <> -1 or isset($data['level']))) // Change user's privacy level
 					{
-						$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET level = '".(isset($data['level']) ? $data['level'] : $conf_UAM[36])."'
-WHERE user_id = '".$data['user_id']."'
-;";
+						$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET level = "'.(isset($data['level']) ? $data['level'] : $conf_UAM[36]).'"
+WHERE user_id = '.$data['user_id'].'
+;';
 						pwg_query($query);
 					}
@@ -2108,74 +2118,82 @@
 
 /**
- * Function called from UAM_admin.php to force users validation by admin
+ * Function called from UAM_admin.php for manual validation by admin
  *
  * @param : User id
  * 
  */
-function ForceValidation($id)
-{
-  global $conf;
-
-  $conf_UAM = unserialize($conf['UserAdvManager']);
-
-  if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')
-  {
-    list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
-
-		$query = "
-UPDATE ".USER_CONFIRM_MAIL_TABLE."
-SET date_check='".$dbnow."'
-WHERE user_id = '".$id."'
-;";
-    pwg_query($query);
-  }
-
-  if ($conf_UAM[2] <> -1) // Delete user from waiting group
-	{
-    $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$id."'
-  AND group_id = '".$conf_UAM[2]."'
-;";
+function ManualValidation($id)
+{
+		global $conf;
+
+		$conf_UAM = unserialize($conf['UserAdvManager']);
+
+		if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') // Set date of validation
+		{
+				list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
+
+				$query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET date_check="'.$dbnow.'"
+WHERE user_id = '.$id.'
+;';
+				pwg_query($query);
+		}
+
+		if ($conf_UAM[2] <> -1) // Delete user from waiting group
+		{
+				$query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$id.'
+		AND group_id = "'.$conf_UAM[2].'"
+;';
+				pwg_query($query);
+		}
+  
+		if ($conf_UAM[3] <> -1) // Set user's valid group
+		{
+				$query = '
+DELETE FROM '.USER_GROUP_TABLE.'
+WHERE user_id = '.$id.'
+		AND group_id = "'.$conf_UAM[3].'"
+;';
+				pwg_query($query);
+	
+				$query = '
+INSERT INTO '.USER_GROUP_TABLE.'
+		(user_id, group_id)
+VALUES
+		('.$id.', "'.$conf_UAM[3].'")
+;';
+				pwg_query($query);
+		}
+
+		if ($conf_UAM[4] <> -1) // Set user's valid status
+		{
+				$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET status = "'.$conf_UAM[4].'"
+WHERE user_id = '.$id.'
+;';
+				pwg_query($query);
+		}
+
+		if ($conf_UAM[36] <> -1) // Set user's valid privacy level
+		{
+				$query = '
+UPDATE '.USER_INFOS_TABLE.'
+SET level = "'.$conf_UAM[36].'"
+WHERE user_id = '.$id.'
+;';
+				pwg_query($query);
+		}
+
+		// Set UAM_validated field to True in #_users table
+		$query = '
+UPDATE '.USERS_TABLE.'
+SET UAM_validated = "true"
+WHERE id = '.$id.'
+;';
 		pwg_query($query);
-  }
-  
-	if ($conf_UAM[3] <> -1) // Set user's valid group
-	{
-    $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$id."'
-  AND group_id = '".$conf_UAM[3]."'
-;";
-    pwg_query($query);
-	
-		$query = "
-INSERT INTO ".USER_GROUP_TABLE."
-  (user_id, group_id)
-VALUES
-  ('".$id."', '".$conf_UAM[3]."')
-;";
-		pwg_query($query);
-  }
-
-	if ($conf_UAM[4] <> -1) // Set user's valid status
-	{
-    $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[4]."'
-WHERE user_id = '".$id."'
-;";
-		pwg_query($query);
-  }
-
-	if ($conf_UAM[36] <> -1) // Set user's valid privacy level
-	{
-    $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET level = '".$conf_UAM[36]."'
-WHERE user_id = '".$id."'
-;";
-		pwg_query($query);
-  }
 }
 
@@ -2544,9 +2562,9 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
 	
-	$query = "
+	$query = '
 SELECT registration_date
-  FROM ".USER_INFOS_TABLE."
-WHERE user_id = '".$id."'
-;";
+  FROM '.USER_INFOS_TABLE.'
+WHERE user_id = '.$id.'
+;';
 	list($registration_date) = pwg_db_fetch_row(pwg_query($query));
 
@@ -2765,4 +2783,22 @@
 
 /**
+ * SetUnvalidated
+ * Set UAM_validated field to false in #_users table
+ * 
+ **/
+function SetUnvalidated($user_id)
+{
+  $query ='
+UPDATE '.USERS_TABLE.'
+SET UAM_validated = "false"
+WHERE id = '.$user_id.'
+LIMIT 1
+;';
+
+  pwg_query($query);
+}
+
+
+/**
  * UAM_Set_PwdReset
  * Action in user_list to set a password reset for a user
Index: /extensions/UserAdvManager/trunk/include/upgradedb.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 17918)
@@ -137,8 +137,8 @@
   // Create missing table
   // --------------------
-  $query = "
-ALTER TABLE ".USER_CONFIRM_MAIL_TABLE."
-ADD reminder ENUM('true', 'false') NULL DEFAULT NULL
-;";
+  $query = '
+ALTER TABLE '.USER_CONFIRM_MAIL_TABLE.'
+ADD reminder ENUM("true", "false") NULL DEFAULT NULL
+;';
   
   pwg_query($query);
Index: /extensions/UserAdvManager/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 17918)
@@ -182,5 +182,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Handbuch Validierung';
+$lang['UAM_Manual_Validation'] = 'Handbuch Validierung';
 $lang['UAM_Confirm_Mail_true'] = ' Aktivieren - Validation von Benutzer';
 $lang['UAM_Confirm_Mail_local'] = ' Aktivieren - Validation von admin (keine Validierung Key gesendet)';
Index: /extensions/UserAdvManager/trunk/language/el_GR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/el_GR/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/el_GR/plugin.lang.php	(revision 17918)
@@ -116,5 +116,5 @@
 $lang['UAM_GTAutoDel'] = 'Αυτόματη διαγραφή των λογαριασμών';
 $lang['UAM_GTAuto'] = 'Αυτόματη διαχείριση των ghosts users';
-$lang['UAM_Force_Validation'] = 'Χειροκίνητη επιβεβαίωση';
+$lang['UAM_Manual_Validation'] = 'Χειροκίνητη επιβεβαίωση';
 $lang['UAM_Expired_Status'] = '<b>Η Κατάσταση</b> για την εγγραφή του χρήστη έχει λήξει<br>';
 $lang['UAM_Expired_Level'] = '<b>Το επίπεδο προστασίας</b> για την εγγραφή του χρήστη έχει λήξει<br>';
Index: /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 17918)
@@ -155,5 +155,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Manual confirmation';
+$lang['UAM_Manual_Validation'] = 'Manual confirmation';
 $lang['UAM_Confirm_Mail_true'] = ' Enable - Confirmation by user';
 $lang['UAM_Confirm_Mail_local'] = ' Enable - Confirmation by admin (no confirmation key sent)';
Index: /extensions/UserAdvManager/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 17918)
@@ -215,5 +215,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Validación manual';
+$lang['UAM_Manual_Validation'] = 'Validación manual';
 $lang['UAM_Confirm_Mail_true'] = ' Activar - La validación por el usuario';
 $lang['UAM_Confirm_Mail_local'] = ' Activar - La validación por el administrador (sin clave de validación enviado)';
Index: /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 17918)
@@ -167,5 +167,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Confirmation manuelle';
+$lang['UAM_Manual_Validation'] = 'Confirmation manuelle';
 $lang['UAM_Confirm_Mail_true'] = ' Activer - Confirmation par le visiteur';
 $lang['UAM_Confirm_Mail_local'] = ' Activer - Confirmation par l\'administrateur (pas d\'envoi de clé de confirmation)';
Index: /extensions/UserAdvManager/trunk/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/hu_HU/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/hu_HU/plugin.lang.php	(revision 17918)
@@ -176,5 +176,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Kézi érvényesítés';
+$lang['UAM_Manual_Validation'] = 'Kézi érvényesítés';
 $lang['UAM_Confirm_Mail_true'] = ' Bekapcsolva - Érvényesítés a felhasználó által';
 $lang['UAM_Confirm_Mail_local'] = ' Bekapcsolva - Érvényesítés az adminisztrátor által (nincs érvényesítő kulcs küldés)';
Index: /extensions/UserAdvManager/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 17918)
@@ -175,5 +175,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Conferma manuale';
+$lang['UAM_Manual_Validation'] = 'Conferma manuale';
 $lang['UAM_Confirm_Mail_true'] = ' Attivare - Validazione da parte dell\'utente';
 $lang['UAM_Confirm_Mail_local'] = ' Attivare - Validazione da parte di un amministratore (nessuna chiave di validazione inviata)';
Index: /extensions/UserAdvManager/trunk/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/lv_LV/plugin.lang.php	(revision 17917)
+++ /extensions/UserAdvManager/trunk/language/lv_LV/plugin.lang.php	(revision 17918)
@@ -213,5 +213,5 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-$lang['UAM_Force_Validation'] = 'Manuālā apstiprināšana';
+$lang['UAM_Manual_Validation'] = 'Manuālā apstiprināšana';
 $lang['UAM_Confirm_Mail_true'] = ' Iespējot – Apstiprinājis lietotājs';
 $lang['UAM_Confirm_Mail_local'] = ' Iespējot – Apstiprinājis administrators (netika nosūtīta apstiprināšanas atslēga)';
