Index: /extensions/NBC_UserAdvManager/trunk/ConfirmMail.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/ConfirmMail.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/ConfirmMail.php	(revision 9253)
@@ -68,5 +68,5 @@
       // Management of Extension flags ([username], [mygallery], [myurl])
       $patterns[] = '#\[username\]#i';
-      $replacements[] = $username;
+      $replacements[] = $result['username'];
       $patterns[] = '#\[mygallery\]#i';
       $replacements[] = $conf['gallery_title'];
@@ -100,5 +100,5 @@
       // Management of Extension flags ([username], [mygallery], [myurl])
       $patterns[] = '#\[username\]#i';
-      $replacements[] = $username;
+      $replacements[] = $result['username'];
       $patterns[] = '#\[mygallery\]#i';
       $replacements[] = $conf['gallery_title'];
Index: /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php	(revision 9253)
@@ -105,5 +105,5 @@
   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_No_Comment_Anonymous']) 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_CustomPasswRetr']))
+	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_No_Comment_Anonymous']) 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']))
   {
 
@@ -551,9 +551,10 @@
 		}
 
-    // Avoid jquery accordeon menu bug when there is no users to display
-    if (empty($visible_user_list))
+    // Avoid jquery accordion menu bug when there is no users to display
+    // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty)
+    /*if (empty($visible_user_list))
     {
       $visible_user_list[] = null;
-    }
+    }*/
 
 		foreach ($visible_user_list as $local_user)
@@ -1029,8 +1030,9 @@
 
     // Avoid jquery accordeon menu bug when there is no users to display
-    if (empty($visible_user_list))
+    // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty)
+    /*if (empty($visible_user_list))
     {
       $visible_user_list[] = null;
-    }
+    }*/
 
 		foreach ($visible_user_list as $local_user)
@@ -1353,18 +1355,15 @@
 		}
     
-    if (isset($_POST['GhostTracker_Init']))
-    {
-      //Reset is only allowed for admins !
-      if (is_admin())
-      {
-        $query1 = '
+    if (isset($_POST['GhostTracker_Init']) and is_admin()) //Reset is only allowed for admins !
+    {
+      $query1 = '
 SELECT *
   FROM '.USER_LASTVISIT_TABLE.';';
 
-        $count = pwg_db_num_rows(pwg_query($query1));
-
-        if ($count <> 0)
-        {
-          $query = '
+      $count = pwg_db_num_rows(pwg_query($query1));
+
+      if ($count <> 0)
+      {
+        $query = '
 SELECT DISTINCT u.id,
                 ui.status AS status
@@ -1379,20 +1378,20 @@
 ;';
 
-          $result = pwg_query($query);
+        $result = pwg_query($query);
           
-          while ($row = pwg_db_fetch_assoc($result))
-          {
-            list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
+        while ($row = pwg_db_fetch_assoc($result))
+        {
+          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
             
-            $query = "
+          $query = "
 INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
 VALUES ('".$row['id']."','".$dbnow."','false')
 ;";
-            pwg_query($query);
-          }
+          pwg_query($query);
         }
-        else if ($count == 0)
-        {
-          $query = '
+      }
+      else if ($count == 0)
+      {
+        $query = '
 SELECT DISTINCT u.id,
                 ui.status AS status
@@ -1406,20 +1405,19 @@
 ;';
 
-          $result = pwg_query($query);
+        $result = pwg_query($query);
           
-          while($row = pwg_db_fetch_assoc($result))
-          {
-            list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
+        while($row = pwg_db_fetch_assoc($result))
+        {
+          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
             
-            $query = "
+          $query = "
 INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
 VALUES ('".$row['id']."','".$dbnow."','false')
 ;";
-            pwg_query($query);
-          }
+          pwg_query($query);
         }
+      }
         
-        array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK'));
-      }
+      array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK'));
     }
 
Index: /extensions/NBC_UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 9253)
@@ -229,4 +229,5 @@
             Bug 2186 fixed - JQuery accordion menu when no users are listed in UAM tables
             Bug 2188 fixed - Avoid translation flags conflicts
+            Bug 2192 fixed - GT Automated tasks improvement and refactory
 
 */
Index: /extensions/NBC_UserAdvManager/trunk/del_account.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/del_account.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/del_account.php	(revision 9253)
@@ -4,5 +4,4 @@
 
 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-include_once( PHPWG_ROOT_PATH.'include/functions_mail.inc.php' );
 
 include_once (UAM_PATH.'include/constants.php');
@@ -17,32 +16,30 @@
 
 
-  global $user, $lang, $conf, $errors;
+global $user, $lang, $conf, $errors;
   
 
-  $conf_UAM = unserialize($conf['UserAdvManager']);
+$conf_UAM = unserialize($conf['UserAdvManager']);
 
-  if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
+if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
+{
+  // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here
+  $patterns[] = '#\[mygallery\]#i';
+  $replacements[] = $conf['gallery_title'];
+  $patterns[] = '#\[myurl\]#i';
+  $replacements[] = $conf['gallery_url'];
+
+  if (function_exists('get_user_language_desc'))
   {
-    // Management of Extension flags ([username], [mygallery], [myurl])
-    $patterns[] = '#\[username\]#i';
-    $replacements[] = $username;
-    $patterns[] = '#\[mygallery\]#i';
-    $replacements[] = $conf['gallery_title'];
-    $patterns[] = '#\[myurl\]#i';
-    $replacements[] = $conf['gallery_url'];
-      
-    if (function_exists('get_user_language_desc'))
-    {
-      $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[24]));
-    }
-    else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[24]));
+    $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[24]));
   }
+  else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[24]));
+}
     
-  $template->assign(
-    array(
-      'GALLERY_URL'          => make_index_url(),
-			'CUSTOM_REDIR_MSG'     => $custom_text,
-		)
-  );
+$template->assign(
+  array(
+    'GALLERY_URL'          => make_index_url(),
+	'CUSTOM_REDIR_MSG'     => $custom_text,
+  )
+);
 
 if (isset($lang['Theme: '.$user['theme']]))
Index: /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php	(revision 9253)
@@ -322,8 +322,8 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
-  // Performing scheduled tasks
+  // Performing GhostTracker scheduled tasks
   if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true'))
   {
-    UAM_ScheduledTasks();
+    UAM_GT_ScheduledTasks();
   }
 
@@ -350,11 +350,18 @@
  * Triggered on UAM_LoginTasks()
  * 
- * Executes optional post-login tasks
- * 
- */
-function UAM_ScheduledTasks()
+ * Executes optional post-login tasks for Ghost users
+ * 
+ */
+function UAM_GT_ScheduledTasks()
 {
   global $conf, $user, $page;
-  
+
+  if (!defined('PHPWG_ROOT_PATH'))
+  {
+    die('Hacking attempt!');
+  }
+          
+  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
@@ -377,122 +384,30 @@
       if (in_array($user['id'], $collection))
     	{
-        foreach ($collection as $user_id)
-        {
-          // Check lastvisit reminder state
-          $query = '
+        // Check lastvisit reminder state
+        $query = '
 SELECT reminder
 FROM '.USER_LASTVISIT_TABLE.'
-WHERE user_id = '.$user_id.';';
-
-          $result = pwg_db_fetch_assoc(pwg_query($query));
-
-          if (isset($result['reminder']) and $result['reminder'] == 'true')
-          {
-            $reminder = true;
-          }
-          else
-          {
-            $reminder = false;
-          }
-
-          // If never reminded before, set reminder True
-          if (!$reminder)
-          {
-            // Reset of lastvisit date 
-            list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
-
-		        $query = "
-UPDATE ".USER_LASTVISIT_TABLE."
-SET lastvisit='".$dbnow."'
-WHERE user_id = '".$user_id."'
-;";
-            pwg_query($query);
-
-          // Auto change group and / or status
-            // Delete user from all groups
-            $query = "
-DELETE FROM ".USER_GROUP_TABLE."
-WHERE user_id = '".$user_id."'
-  AND (
-    group_id = '".$conf_UAM[2]."'
-  OR 
-    group_id = '".$conf_UAM[3]."'
-  )
-;";
-
-            pwg_query($query);
-
-            // Change user status
-            if ($conf_UAM[27] <> -1)
-            {
-              $query = "
-UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[27]."'
-WHERE user_id = '".$user_id."'
-;";
-              pwg_query($query);
-            }
-
-            // Change user group
-            if ($conf_UAM[26] <> -1)
-            {
-              $query = "
-INSERT INTO ".USER_GROUP_TABLE."
-  (user_id, group_id)
-VALUES
-  ('".$user_id."', '".$conf_UAM[26]."')
-;";
-              pwg_query($query);
-            }
-          
-            // Auto send email notification on group / status downgrade only if never reminded before
-            if (isset($conf_UAM[23]) and $conf_UAM[23] == 'true')
-            {
-              // Set reminder true
-              $query = "
-UPDATE ".USER_LASTVISIT_TABLE."
-SET reminder = 'true'
-WHERE user_id = '".$user_id."'
-;";
-              pwg_query($query);
-
-              // Reset confirmed user date_check
-              $query = '
-UPDATE '.USER_CONFIRM_MAIL_TABLE.'
-SET date_check = NULL
-WHERE user_id = "'.$user_id.'"
-;';
-						  pwg_query($query);
-
-              // Get users information for email notification
-						  $query = '
-SELECT username, mail_address
-FROM '.USERS_TABLE.'
-WHERE id = '.$user_id.'
-;';
-						  $data = pwg_db_fetch_assoc(pwg_query($query));
-            
-              demotion_mail($user_id, $data['username'], $data['mail_address']);
-            }
-          }
-          elseif ($reminder) // If user already reminded for ghost account
-          {
-            // delete account
-            delete_user($user_id);
-          }
+WHERE user_id = '.$user['id'].';';
+
+        $result = pwg_db_fetch_assoc(pwg_query($query));
+
+        if (isset($result['reminder']) and $result['reminder'] == 'true')
+        {
+          $reminder = true;
         }
-
-        if (!$reminder) // If user never reminded for ghost account
+        else
         {
-          // Logged-in user cleanup
+          $reminder = false;
+        }
+
+        // If never reminded before, set reminder True
+        if ($reminder) // If user already reminded for ghost account
+        {
+          // delete account
+          delete_user($user['id']);
+
+          // Logged-in user cleanup, session destruction and redirected to custom page
           invalidate_user_cache();
-          log_user($user['id'], false);
-          redirect(make_index_url());
-        }
-        elseif ($reminder) // If user already reminded for ghost account
-        {
-          // Logged-in user cleanup
-          invalidate_user_cache();
-          log_user($user['id'], false);
+          logout_user();
           redirect(UAM_PATH.'del_account.php');
         }
@@ -1097,5 +1012,5 @@
     // Management of Extension flags ([username], [mygallery], [myurl])
     $patterns[] = '#\[username\]#i';
-    $replacements[] = $username;
+    $replacements[] = stripslashes($username);
     $patterns[] = '#\[mygallery\]#i';
     $replacements[] = $conf['gallery_title'];
@@ -1122,4 +1037,5 @@
   ); 
 
+  resetlastvisit($id);
 
 // Sending the email with subject and contents
@@ -1196,5 +1112,5 @@
     // Management of Extension flags ([username], [mygallery], [myurl])
     $patterns[] = '#\[username\]#i';
-    $replacements[] = $username;
+    $replacements[] = $result['username'];
     $patterns[] = '#\[mygallery\]#i';
     $replacements[] = $conf['gallery_title'];
@@ -2197,5 +2113,5 @@
   $score = $step1 * $step2;
 
-  // Multiplication du résultat par la longueur de la chaîne - Multiplying the result by the length of the chain
+  // Multiplication du resultat par la longueur de la chaine - Multiplying the result by the length of the string
   $finalscore = $score * $length;
 
Index: /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php	(revision 9253)
@@ -336,4 +336,7 @@
   $Newconf_UAM[29] = 'false';
   $Newconf_UAM[30] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.';
+  $Newconf_UAM[31] = 'false';
+  $Newconf_UAM[32] = 'Sorry [username], your account has been deleted because you have not validated your registration in requested time. Please, try registration with a valid and non blocked email account.';
+  $Newconf_UAM[33] = 'false';
   
   $update_conf = serialize($Newconf_UAM);
Index: /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php	(revision 9253)
@@ -220,5 +220,5 @@
 /*TODO*/$lang['UAM_GTAutoDelTitle_d'] = 'Dies ist nur gültig, wenn der Benutzer, dessen Konto ist abgelaufen selbst löst die Streichung Mechanismus (selten, aber möglich). Er ist dann der Galerie getrennt und umgeleitet auf eine Seite mit der Löschung seines Accounts und gegebenenfalls die Gründe für die Streichung dieses Absatzes.
 <br><br>
-Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email. Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options. <b style=&quot;color: red;&quot;>[username]</b> is not available here because concerned user has been deleted.
 <br><br>
 Custom Text für die Weiterleitungsseite können in dieses Feld eingegeben werden dass ist kompatibel mit den FCK-Editor und, um mehrere Sprachen zu benutzen, können Sie die Extended description Plugin-Tags verwenden, wenn er aktiv ist.';
Index: /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php	(revision 9253)
@@ -220,5 +220,5 @@
 $lang['UAM_GTAutoDelTitle_d'] = 'This is only valid when the user whose account has expired itself triggers the deletion mechanism (rare but possible). he\'s then disconnected of the gallery and redirected to a page showing the deletion of his account and, possibly, the reasons for this deletion.
 <br><br>
-Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email. Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options. <b style=&quot;color: red;&quot;>[username]</b> is not available here because concerned user has been deleted.
 <br><br>
 Custom text for the redirect page can be entered in this field that is compatible with the FCK Editor and, for multi-languages, you can use the tags [lang] of the plugin Extended description if it\'s active.';
Index: /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php	(revision 9253)
@@ -216,5 +216,5 @@
 /*TODO*/$lang['UAM_GTAutoDelTitle_d'] = 'This is only valid when the user whose account has expired itself triggers the deletion mechanism (rare but possible). he\'s then disconnected of the gallery and redirected to a page showing the deletion of his account and, possibly, the reasons for this deletion.
 <br><br>
-Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email. Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options. <b style=&quot;color: red;&quot;>[username]</b> is not available here because concerned user has been deleted.
 <br><br>
 Custom text for the redirect page can be entered in this field that is compatible with the FCK Editor and, for multi-languages, you can use the tags [lang] of the plugin Extended description if it\'s active.';
Index: /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php	(revision 9253)
@@ -43,7 +43,4 @@
 Cette option n\'est utilisable qu\'une fois l\'option &quot;Confirmation d\'inscription&quot; activée';
 $lang['UAM_remailTitle'] = 'Mail de rappel aux inscrits non validés';
-$lang['UAM_remailTitle_d'] = 'Cette option permet d\'envoyer un email de rappel aux utilisateurs n\'ayant pas validé leur inscription dans les temps. Elle n\'a d\'effet qu\'une fois l\'option &quot;Confirmation d\'inscription&quot; activée.<br><br>
-2 types d\'email peuvent être envoyés : Avec ou sans régénération de la clef de validation. En fonction du cas, le contenu  des emails peut être personnalisé.<br><br>
-Reportez-vous à l\'onglet &quot;Suivi des validations&quot;.';
 $lang['UAM_remailtxt1Title'] = 'Message de rappel avec regénération de clé';
 $lang['UAM_remailtxt2Title'] = 'Message de rappel sans regénération de clé';
@@ -217,5 +214,5 @@
 $lang['UAM_GTAutoDelTitle_d'] = 'Ceci n\'est valable que lorsque l\'utilisateur dont le compte a expiré déclenche lui même le mécanisme de suppression (cas rare mais possible). Il est alors déconnecté de force de la galerie et redirigé vers une page indiquant la suppression de son compte et, éventuellement, les raisons de cette suppression.
 <br><br>
-Personnalisez encore plus le contenu avec les balises d\'insertion spéciales : Utilisez la balise <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email. Utilisez la balise <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie. Utilisez la balise <b style=&quot;color: red;&quot;>[myurl]</b> pour insérer l\'URL de votre galerie si renseigné dans les options de configuration de Piwigo.
+Personnalisez encore plus le contenu avec les balises d\'insertion spéciales : Utilisez la balise <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie. Utilisez la balise <b style=&quot;color: red;&quot;>[myurl]</b> pour insérer l\'URL de votre galerie si renseigné dans les options de configuration de Piwigo. La balise <b style=&quot;color: red;&quot;>[username]</b> n\'est pas disponible ici puisque l\'utilisateur en question a été supprimé (CQFD !).
 <br><br>
 Un texte personnalisé pour cette page de redirection peut être saisi dans le champ ci-dessous qui est compatible avec l\'extension FCK Editor. Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.';
@@ -238,4 +235,28 @@
 <br><br>
 Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.';
+$lang['UAM_validationlimitTitle_d'] = 'Cette option permet de limiter le nombre de jours pendant lequel un nouvel utilisateur peut valider son inscription. Une fois ce délai expiré, le lien de validation sera invalide, et ne pourra plus être employé.
+<br><br>
+Cette option n\'est utilisable qu\'une fois l\'option &quot;Confirmation d\'inscription&quot; activée.
+<br><br>
+Si cette option et l\'option &quot;Mail de rappel aux inscrits non validés&quot; sont activées, de nouvelles options apparaitront plus bas dans cette section pour permettre l\'automatisation de la gestion des visiteurs non validés.';
+$lang['UAM_remailTitle_d'] = 'Cette option permet d\'envoyer un email de rappel aux utilisateurs n\'ayant pas validé leur inscription dans les temps. Elle n\'a d\'effet qu\'une fois l\'option &quot;Confirmation d\'inscription&quot; activée.<br><br>
+2 types d\'email peuvent être envoyés : Avec ou sans régénération de la clef de validation. En fonction du cas, le contenu  des emails peut être personnalisé.<br><br>
+Reportez-vous à l\'onglet &quot;Suivi des validations&quot;.
+<br><br>
+Si cette option et l\'option &quot;Mail de rappel aux inscrits non validés&quot; sont activées, de nouvelles options apparaitront plus bas dans cette section pour permettre l\'automatisation de la gestion des visiteurs non validés.';
+$lang['UAM_USRAutoTitle'] = 'Gestion automatique des visiteurs non validés';
+$lang['UAM_USRAutoTitle_d'] = 'La gestion automatique des visiteurs non validés est déclenchée à chaque connexion à la galerie et fonctionne ainsi :
+<br><br>
+- Suppression automatique des comptes non validés dans le temps imparti sans envoi automatique de mail de relance -> &quot;Limitation du délai de validation d\'inscription&quot; <b><u>est actif</u></b> et &quot;Mail de rappel aux inscrits non validés&quot; <b><u>est inactif</u></b>.
+<br><br>
+- Envoi automatique d\'un message de rappel avec génération d\'une nouvelle clé de validation puis suppression automatique des comptes non validés dans le temps imparti après l\'envoi de la relance -> &quot;Limitation du délai de validation d\'inscription&quot; <b><u>est actif</u></b> et &quot;Mail de rappel aux inscrits non validés&quot; <b><u>est actif</u></b>.';
+$lang['UAM_USRAutoDelTitle'] = 'Message à la suppressions automatiques des comptes';
+$lang['UAM_USRAutoDelTitle_d'] = 'Ceci n\'est valable que lorsque l\'utilisateur dont le compte est à supprimer déclenche lui même le mécanisme de suppression (cas rare mais possible). Il est alors déconnecté de force de la galerie et redirigé vers une page indiquant la suppression de son compte et, éventuellement, les raisons de cette suppression.
+<br><br>
+Un texte pour cette page de redirection est donné à titre d\'exemple, ci-dessous, et peut être personnalisé. Ce champ est compatible avec le plugin FCK Editor. Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.
+<br><br>
+Personnalisez encore plus le contenu avec les balises d\'insertion spéciales : Utilisez la balise <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email. Utilisez la balise <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie. Utilisez la balise <b style=&quot;color: red;&quot;>[myurl]</b> pour insérer l\'URL de votre galerie si renseigné dans les options de configuration de Piwigo.';
+$lang['UAM_USRAutoMailTitle'] = 'Message de rappel automatique';
+$lang['UAM_USRAutoMailTitle_d'] = 'Lorsque activée, cette fonction enverra automatiquement le contenu personnalisé dans &quot;Message de rappel avec regénération de clé&quot; aux visiteurs répondant au critère.';
 // --------- End: New or revised $lang ---- from version 2.20.0
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 9253)
@@ -289,4 +289,11 @@
 $lang['UAM_CustomPasswRetr_false'] = ' Désactiver (valeur par défaut)';
 $lang['UAM_CustomPasswRetr_true'] = ' Activer';
+$lang['UAM_USRAuto'] = 'Gestion automatique des visiteurs non validés';
+$lang['UAM_USRAuto_false'] = ' Désactiver (valeur par défaut)';
+$lang['UAM_USRAuto_true'] = ' Activer';
+$lang['UAM_USRAutoDel'] = 'Message à la suppressions automatiques des comptes';
+$lang['UAM_USRAutoMail'] = 'Message de rappel automatique';
+$lang['UAM_USRAutoMail_false'] = ' Désactiver (valeur par défaut)';
+$lang['UAM_USRAutoMail_true'] = ' Activer';
 // --------- End: New or revised $lang ---- from version 2.20.0
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php	(revision 9253)
@@ -207,5 +207,5 @@
 /* TODO */$lang['UAM_GTAutoDelTitle_d'] = 'This is only valid when the user whose account has expired itself triggers the deletion mechanism (rare but possible). he\'s then disconnected of the gallery and redirected to a page showing the deletion of his account and, possibly, the reasons for this deletion.
 <br><br>
-Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email. Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options. <b style=&quot;color: red;&quot;>[username]</b> is not available here because concerned user has been deleted.
 <br><br>
 Custom text for the redirect page can be entered in this field that is compatible with the FCK Editor and, for multi-languages, you can use the tags [lang] of the plugin Extended description if it\'s active.';
Index: /extensions/NBC_UserAdvManager/trunk/language/lv_LV/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/lv_LV/help/plugin.lang.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/language/lv_LV/help/plugin.lang.php	(revision 9253)
@@ -241,5 +241,5 @@
 /* TODO */$lang['UAM_GTAutoDelTitle_d'] = 'Šis variants ir iespējams tikai tad, ja lietotājs, kura konta derīguma termiņš ir beidzies, pats ieslēdz dzēšanas mehānismu (rets, bet iespējams gadījums). Tad viņš tiek atslēgts no galerijas un novirzīts uz lapu, kas atspoguļo viņa konta dzēšanas faktu un iespējamo šīs dzēšanas iemeslu.
 <br><br>
-Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email. Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+Further customize the content with special inserted tags : Use <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery. Use <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options. <b style=&quot;color: red;&quot;>[username]</b> is not available here because concerned user has been deleted.
 <br><br>
 Pāradresācijas lapai paredzēto pielāgoto tekstu var ievadīt šajā laukā, savietojams ar FCK Redaktora standartu, lai izmantotu multi-valodu režīmu, lietojiet spraudņa paplašinātais apraksts Extended description iezīmes [lang], tikai gadījumā, ja spraudnis aktīvs.';
Index: /extensions/NBC_UserAdvManager/trunk/maintain.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/maintain.inc.php	(revision 9252)
+++ /extensions/NBC_UserAdvManager/trunk/maintain.inc.php	(revision 9253)
@@ -26,5 +26,5 @@
 Best regards,
 
-The admin of the gallery.','false','false','false','false','false','Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery].','Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account.',-1,-1,'Thank you for registering at [mygallery]. Your account has been manually validated by _admin_. You may now log in at _link_to_site_ and make any appropriate changes to your profile. Welcome to _name_of_site_!','false','You have requested a password reset on our gallery. Please, find below your new connection settings.');
+The admin of the gallery.','false','false','false','false','false','Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery].','Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account.',-1,-1,'Thank you for registering at [mygallery]. Your account has been manually validated by _admin_. You may now log in at _link_to_site_ and make any appropriate changes to your profile. Welcome to _name_of_site_!','false','You have requested a password reset on our gallery. Please, find below your new connection settings.','false','Sorry, your account has been deleted because you have not validated your registration in requested time. Please, try registration with a valid and non blocked email account.','false');
 
   $q = '
