Index: /extensions/UserAdvManager/trunk/ConfirmMail.php
===================================================================
--- /extensions/UserAdvManager/trunk/ConfirmMail.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/ConfirmMail.php	(revision 12271)
@@ -42,5 +42,6 @@
     log_user($userid, false);
 
-/* We have to get the user's language in database */
+// We have to get the user's language in database
+// ----------------------------------------------
     $query = '
 SELECT language
@@ -50,8 +51,10 @@
     $data = pwg_db_fetch_assoc(pwg_query($query));
 
-/* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */
+// Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language
+// -------------------------------------------------------------------------------------------------------------------------------
     if (empty($data))
     {
-/* And switch gallery to this language before using personalized and multilangual contents */
+// And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
       $language = pwg_get_session_var('lang_switch', $user['language']);
       switch_lang_to($language);
@@ -59,5 +62,6 @@
     else
     {
-/* And switch gallery to this language before using personalized and multilangual contents */
+// And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
       switch_lang_to($data['language']);
       load_language('plugin.lang', UAM_PATH);
@@ -67,4 +71,5 @@
     {
       // Management of Extension flags ([username], [mygallery], [myurl])
+      // ----------------------------------------------------------------
       $patterns[] = '#\[username\]#i';
       $replacements[] = $result['username'];
@@ -99,4 +104,5 @@
     {
       // Management of Extension flags ([username], [mygallery], [myurl])
+      // ----------------------------------------------------------------
       $patterns[] = '#\[username\]#i';
       $replacements[] = $result['username'];
Index: /extensions/UserAdvManager/trunk/GT_del_account.php
===================================================================
--- /extensions/UserAdvManager/trunk/GT_del_account.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/GT_del_account.php	(revision 12271)
@@ -24,4 +24,5 @@
 {
   // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here
+  // -----------------------------------------------------------------------------------------
   $patterns[] = '#\[mygallery\]#i';
   $replacements[] = $conf['gallery_title'];
Index: /extensions/UserAdvManager/trunk/USR_del_account.php
===================================================================
--- /extensions/UserAdvManager/trunk/USR_del_account.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/USR_del_account.php	(revision 12271)
@@ -24,4 +24,5 @@
 {
   // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here
+  // -----------------------------------------------------------------------------------------
   $patterns[] = '#\[mygallery\]#i';
   $replacements[] = $conf['gallery_title'];
Index: /extensions/UserAdvManager/trunk/admin/UAM_admin.php
===================================================================
--- /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 12271)
@@ -112,8 +112,9 @@
   {
 
-    //General configuration settings
+    // Render free text 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_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'])));
@@ -130,4 +131,5 @@
 
     // 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']))
     {
@@ -137,4 +139,5 @@
 
     // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled
+    // ---------------------------------------------------------------------------------------------------------
     $conf_UAM = unserialize($conf['UserAdvManager']);
     $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
@@ -148,4 +151,5 @@
 
     // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set)
+    // ----------------------------------------------------------------------------------
     if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_Text']) != 0)
     {
@@ -155,4 +159,5 @@
 
     // Save global UAM configuration
+    // -----------------------------
 		$newconf_UAM = array(
       $_POST['UAM_Mail_Info'],
@@ -201,5 +206,6 @@
     conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager']));
 
-    //Email confirmation settings
+    // Email confirmation settings
+    // --------------------------
     $_POST['UAM_ConfirmMail_ReMail_Txt1'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt1'])));
 
@@ -211,4 +217,5 @@
 
     // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set)
+    // ----------------------------------------------------------------------------------
     if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt1']) == 1)
     {
@@ -223,4 +230,5 @@
 
     // Save ConfirmMail settings
+    // -------------------------
 	  $newconf_UAM_ConfirmMail = array (
       $_POST['UAM_ConfirmMail_TimeOut'],
@@ -240,4 +248,5 @@
 
   // Saving UAM tables and configuration settings
+  // --------------------------------------------
   if (isset($_POST['save']))
   {
@@ -254,5 +263,6 @@
   }
 
-  //Testing password enforcement
+  // Testing password enforcement
+  // ----------------------------
   if (isset($_POST['PasswordTest']) and isset($_POST['UAM_Password_Test']) and !empty($_POST['UAM_Password_Test']))
   {
@@ -266,5 +276,6 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
 
-  //Group setting for unvalidated, validated users and downgrade group
+  // Group setting for unvalidated, validated users and downgrade group
+  // ------------------------------------------------------------------
   $groups[-1] = '---------';
   $No_Valid = -1;
@@ -272,5 +283,6 @@
   $Downgrade = -1;
 	
-  //Get groups list in database 
+  // Get groups list in database
+  // ---------------------------
   $query = '
 SELECT id, name
@@ -301,5 +313,6 @@
   }
 	
-  //Template initialization for unvalidated users group
+  // Template initialization for unvalidated users group
+  // ---------------------------------------------------
   $template->assign(
     'No_Confirm_Group',
@@ -309,5 +322,7 @@
 			)
  		);
-  //Template initialization for validated users group
+
+  // Template initialization for validated users group
+  // -------------------------------------------------
   $template->assign(
     'Validated_Group',
@@ -317,5 +332,7 @@
 			)
   	);
-  //Template initialization for downgrade group
+
+  // Template initialization for downgrade group
+  // -------------------------------------------
   $template->assign(
     'Downgrade_Group',
@@ -326,5 +343,6 @@
   	);
 	
-  //Status setting for unvalidated, validated users and downgrade status
+  // Status setting for unvalidated, validated users and downgrade status
+  // --------------------------------------------------------------------
   $status_options[-1] = '------------';
   $No_Valid_Status = -1;
@@ -332,5 +350,6 @@
   $Downgrade_Status = -1;
 	
-  //Get unvalidate status values
+  // Get unvalidate status values
+  // ----------------------------
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
   {
@@ -341,15 +360,17 @@
 	  }
 	  
-      //Template initialization for unvalidated users status
-      $template->assign(
-        'No_Confirm_Status',
-        array(
-					'Status_options' => $status_options,
-		  		'Status_selected' => $No_Valid_Status
-					)
-	  		);
+    // Template initialization for unvalidated users status
+    // ----------------------------------------------------
+    $template->assign(
+      'No_Confirm_Status',
+      array(
+        'Status_options' => $status_options,
+        'Status_selected' => $No_Valid_Status
+			)
+	  );
   }
   
-  //Get validate status values
+  // Get validate status values
+  // --------------------------
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
   {
@@ -360,15 +381,17 @@
 		}
 		
-      //Template initialization for validated users status
-      $template->assign(
-	    'Confirm_Status',
-	    array(
-		    'Status_options' => $status_options,
-		    'Status_selected' => $Valid_Status
-		    )
-	    );
+    // Template initialization for validated users status
+    // --------------------------------------------------
+    $template->assign(
+	  'Confirm_Status',
+	  array(
+		  'Status_options' => $status_options,
+		  'Status_selected' => $Valid_Status
+		  )
+	  );
 	}
 
-  //Get downgrade status values
+  // Get downgrade status values
+  // ---------------------------
   foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
   {
@@ -379,16 +402,18 @@
 		}
 		
-      //Template initialization for validated users status
-      $template->assign(
-	    'Downgrade_Status',
-	    array(
-		    'Status_options' => $status_options,
-		    'Status_selected' => $Downgrade_Status
-		    )
-	    );
+    // Template initialization for validated users status
+    // --------------------------------------------------
+    $template->assign(
+	  'Downgrade_Status',
+	  array(
+		  'Status_options' => $status_options,
+		  'Status_selected' => $Downgrade_Status
+		  )
+	  );
 	}
 
 
-  //Level setting for unvalidated, validated users and downgrade level
+  // Level setting for unvalidated, validated users and downgrade level
+  // ------------------------------------------------------------------
   $level_options[-1] = '------------';
   $No_Valid_Level = -1;
@@ -397,4 +422,5 @@
 
   // Get unvalidated privacy levels values
+  // -------------------------------------
   foreach ($conf['available_permission_levels'] as $level)
   {
@@ -404,15 +430,18 @@
 	    $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
-					)
-	  		);
+
+    // Template initialization for unvalidated users level
+    // ---------------------------------------------------
+    $template->assign(
+      'No_Valid_Level',
+      array(
+        'Level_options' => $level_options,
+        'Level_selected' => $No_Valid_Level
+			)
+	  );
   }
 
   // Get validated privacy levels values
+  // -----------------------------------
   foreach ($conf['available_permission_levels'] as $level)
   {
@@ -422,15 +451,18 @@
 	    $Valid_Level = $level;
 	  }
-      //Template initialization for unvalidated users level
-      $template->assign(
-        'Valid_Level',
-        array(
-					'Level_options' => $level_options,
-		  		'Level_selected' => $Valid_Level
-					)
-	  		);
+
+    // Template initialization for unvalidated users level
+    // ---------------------------------------------------
+    $template->assign(
+      'Valid_Level',
+      array(
+        'Level_options' => $level_options,
+        'Level_selected' => $Valid_Level
+			)
+	  );
   }
 
   // Get downgrade privacy levels values
+  // -----------------------------------
   foreach ($conf['available_permission_levels'] as $level)
   {
@@ -440,15 +472,18 @@
 	    $Downgrade_Level = $level;
 	  }
-      //Template initialization for unvalidated users level
-      $template->assign(
-        'Downgrade_Level',
-        array(
-					'Level_options' => $level_options,
-		  		'Level_selected' => $Downgrade_Level
-					)
-	  		);
+
+    // Template initialization for unvalidated users level
+    // ---------------------------------------------------
+    $template->assign(
+      'Downgrade_Level',
+      array(
+        'Level_options' => $level_options,
+        'Level_selected' => $Downgrade_Level
+			)
+	  );
   }
 
-  //Save last opened paragraph in configuration tab
+  // Save last opened paragraph in configuration tab
+  // -----------------------------------------------
   $nb_para=(isset($_POST["nb_para"])) ? $_POST["nb_para"]:"";
   $nb_para2=(isset($_POST["nb_para2"])) ? $_POST["nb_para2"]:"";
@@ -456,6 +491,7 @@
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
 
+  // ------------------------------------------
   // Template initialization for forms and data
-
+  // ------------------------------------------
   $themeconf=$template->get_template_vars('themeconf');
   $UAM_theme=$themeconf['id'];
@@ -548,5 +584,6 @@
 		$msg_error1 = '';
 		
-    //Username without forbidden keys
+    // Username without forbidden keys
+    // -------------------------------
     if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' )
 	  {
@@ -561,5 +598,5 @@
 			{
 				if (!ValidateUsername(stripslashes($row['username'])))
-					$msg_error1 .= (($msg_error1 <> '') ? '<br>' : '') . l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
+					$msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
 			}
 		}
@@ -567,5 +604,6 @@
 		$msg_error2 = '';
 		
-    //Email without forbidden domain
+    // Email without forbidden domain
+    // ------------------------------
     if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' )
 	  {
@@ -585,5 +623,5 @@
 				  if (preg_match($pattern, $row['mail_address']))
 				  {
-						$msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '') . l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
+						$msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
 					}
 				}
@@ -672,4 +710,5 @@
     {
       // dates formating and compare
+      // ---------------------------
       $today = date("d-m-Y"); // Get today's date
       list($day, $month, $year) = explode('-', $today); // explode date of today						 
@@ -702,4 +741,6 @@
       else $display = '';
 
+      // Template initialization
+      // -----------------------
    		$template->append(
      		'users',
@@ -714,5 +755,6 @@
 			);
 		}
-    //Plugin version inserted
+    // Plugin version inserted
+    // -----------------------
     $template->assign(
       array(
@@ -1191,5 +1233,7 @@
 
 			$expiration = expiration($local_user['id']);
-      
+
+      // Template initialization
+      // -----------------------
    		$template->append(
      		'users',
@@ -1217,4 +1261,5 @@
     // Check if validation of register is made by admin or visitor 
     // If visitor, $Confirm_Local is used to mask useless buttons
+    // -----------------------------------------------------------
     $Confirm_Local = "";
     
@@ -1228,5 +1273,6 @@
     } 
     
-    //Plugin version inserted
+    // Plugin version inserted
+    // -----------------------
     $template->assign(
       array(
@@ -1558,4 +1604,6 @@
     	}
 
+      // Template initialization
+      // -----------------------
       $template->append(
      	  'users',
@@ -1571,5 +1619,6 @@
 		}
 
-    //Plugin version inserted
+    // Plugin version inserted
+    // -----------------------
     $template->assign(
       array(
Index: /extensions/UserAdvManager/trunk/admin/template/ghosttracker.tpl
===================================================================
--- /extensions/UserAdvManager/trunk/admin/template/ghosttracker.tpl	(revision 12270)
+++ /extensions/UserAdvManager/trunk/admin/template/ghosttracker.tpl	(revision 12271)
@@ -113,5 +113,5 @@
   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
 	jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
-	jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
+	//jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
 });
 </script>
Index: /extensions/UserAdvManager/trunk/admin/template/global.tpl
===================================================================
--- /extensions/UserAdvManager/trunk/admin/template/global.tpl	(revision 12270)
+++ /extensions/UserAdvManager/trunk/admin/template/global.tpl	(revision 12271)
@@ -857,5 +857,5 @@
   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
 	jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
-	jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
+	//jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
 });
 </script>
Index: /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl
===================================================================
--- /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl	(revision 12270)
+++ /extensions/UserAdvManager/trunk/admin/template/usermanager.tpl	(revision 12271)
@@ -117,5 +117,5 @@
   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
 	jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
-	jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
+	//jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
 });
 </script>
Index: /extensions/UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/UserAdvManager/trunk/changelog.txt.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/changelog.txt.php	(revision 12271)
@@ -266,4 +266,5 @@
             Bug 2437 fixed - New feature : Request password renewal for selected users in Piwigo's users management panel.
             Bug 2445 fixed - Duplicate key MySql error when a user tries to validate his registration twice.
+            Bug 2447 fixed - Only for installation from scratch, all text fields pre-filled and given as examples are translated into the language of the webmaster (if the language is supported by the plugin). The default language remains English in case of any failure.
             Help files remaned and relocated in the language root directory (no more "help" subdirectory) for compliance with the new online translation tool.
 */
Index: /extensions/UserAdvManager/trunk/include/functions.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/functions.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/include/functions.inc.php	(revision 12271)
@@ -40,4 +40,5 @@
 
   // Admins, Guests and Adult_Content users are not tracked for Ghost Tracker or Users Tracker
+  // -----------------------------------------------------------------------------------------
   if (!is_admin() and !is_a_guest() and $user['username'] != "16" and $user['username'] != "18")
   {
@@ -48,4 +49,5 @@
      	  
       // Looking for existing entry in last visit table
+      // ----------------------------------------------
       $query = '
 SELECT *
@@ -59,4 +61,5 @@
       {
         // If not, data are inserted in table
+        // ----------------------------------
         $query = '
 INSERT INTO '.USER_LASTVISIT_TABLE.' (user_id, lastvisit, reminder)
@@ -68,4 +71,5 @@
       {
         // If yes, data are updated in table
+        // ---------------------------------
         $query = '
 UPDATE '.USER_LASTVISIT_TABLE.'
@@ -93,4 +97,5 @@
 
   // Exclusion of Adult_Content users
+  // --------------------------------
   if ($register_user['username'] != "16" and $register_user['username'] != "18")
   {
@@ -98,4 +103,5 @@
     {
       // This is to send an information email and set user to "waiting" group or status until admin validation
+      // -----------------------------------------------------------------------------------------------------
       $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false);
@@ -105,4 +111,5 @@
     {
       // This is to set user to "waiting" group or status until admin validation
+      // -----------------------------------------------------------------------
       SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation
     }
@@ -110,8 +117,10 @@
     {
       // This is to send an information email without validation key
+      // -----------------------------------------------------------
       $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false);
     }
     // Sending registration confirmation by email
+    // ------------------------------------------
     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true'))
     {
@@ -144,8 +153,11 @@
 {
   // Cleanup for ConfirmMail table
+  // -----------------------------
   DeleteConfirmMail($user_id);
   // Cleanup for LastVisit table
+  // ---------------------------
   DeleteLastVisit($user_id);
   // Cleanup Redirection settings
+  // ----------------------------
   DeleteRedir($user_id);
 }
@@ -162,4 +174,5 @@
 
   // Exclusion of Adult_Content users
+  // --------------------------------
   if ($user['username'] != "16" and $user['username'] != "18")
   {
@@ -171,4 +184,5 @@
 
     // Password enforcement control
+    // ----------------------------
     if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))
     {
@@ -198,4 +212,5 @@
 
     // Username without forbidden keys
+    // -------------------------------
     if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin())
     {
@@ -205,4 +220,5 @@
 
     // Email without forbidden domains
+    // -------------------------------
     if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin())
     {
@@ -225,4 +241,5 @@
 
   // Update first redirection parameter
+  // ----------------------------------
   if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true'))
   {
@@ -242,4 +259,5 @@
 
   // Special message display for password reset
+  // ------------------------------------------
   if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true'))
   {
@@ -251,7 +269,9 @@
 
   // Controls on profile page submission
+  // -----------------------------------
   if (isset($_POST['validate']) and !is_admin())
   {
     // Email without forbidden domains
+    // -------------------------------
     if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['mail_address']))
     {
@@ -264,7 +284,9 @@
 
     // Password reset control
+    // ----------------------
     if (isset($conf_UAM[38]) and $conf_UAM[38] == 'true' and UAM_check_pwgreset($user['id']))
     {
       // if password not changed then pwdreset filed = true else pwdreset field = false
+      // ------------------------------------------------------------------------------
       if (!empty($_POST['use_new_pwd']))
       {
@@ -286,4 +308,5 @@
 
       // Password enforcement control
+      // ----------------------------
       if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))
       {
@@ -301,4 +324,5 @@
 
     // Sending registration confirmation by email
+    // ------------------------------------------
     if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local'))
     {
@@ -316,4 +340,5 @@
 
         // This is to send a new validation key
+        // ------------------------------------
         if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true'))
         
@@ -321,4 +346,5 @@
 
         // This is to set the user to "waiting" group or status until admin validation
+        // ---------------------------------------------------------------------------
         if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local'))
         
@@ -357,4 +383,5 @@
   
   // Performing GhostTracker scheduled tasks
+  // ---------------------------------------
   if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
   {
@@ -363,4 +390,5 @@
 
   // Performing User validation scheduled tasks
+  // ------------------------------------------
   if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true'))
   {
@@ -369,4 +397,5 @@
 
   // Performing redirection to profile page on first login
+  // -----------------------------------------------------
   if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true'))
   {  
@@ -387,4 +416,5 @@
 
   // Performing redirection to profile page for password reset
+  // ---------------------------------------------------------
   if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true'))
   {
@@ -453,5 +483,6 @@
   }
 
-  // Ghost accounts auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded
+  // GhostTracker auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded
+  // ----------------------------------------------------------------------------------------------------------------------------------------------
   if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true') and ((isset($conf_UAM[25]) and $conf_UAM[25] <> -1) or (isset($conf_UAM[26]) and $conf_UAM[26] <> -1) or (isset($conf_UAM[37]) and $conf_UAM[37] <> -1)))
   {
@@ -459,7 +490,9 @@
   	{
       // Process if a non-admin nor webmaster user is logged
+      // ---------------------------------------------------
       if (in_array($user['id'], $collection))
     	{
         // Check lastvisit reminder state
+        // ------------------------------
         $query = '
 SELECT reminder
@@ -479,10 +512,13 @@
 
         // If user already reminded for ghost account
+        // ------------------------------------------
         if ($reminder)
         {
-          // delete account
+          // Delete account
+          // --------------
           delete_user($user['id']);
 
           // Logged-in user cleanup, session destruction and redirected to custom page
+          // -------------------------------------------------------------------------
           invalidate_user_cache();
           logout_user();
@@ -495,4 +531,5 @@
         {
           // Check lastvisit reminder state
+          // ------------------------------
           $query = '
 SELECT reminder
@@ -512,7 +549,9 @@
 
           // If never reminded before
+          // ------------------------
           if (!$reminder)
           {
-            // Reset of lastvisit date 
+            // Reset of lastvisit date
+            // -----------------------
             list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
 
@@ -525,5 +564,7 @@
 
           // Auto change group and / or status
+          // ---------------------------------
             // Delete user from all groups
+            // ---------------------------
             $query = "
 DELETE FROM ".USER_GROUP_TABLE."
@@ -538,4 +579,5 @@
 
             // Change user status
+            // ------------------
             if ($conf_UAM[26] <> -1)
             {
@@ -549,4 +591,5 @@
 
             // Change user group
+            // -----------------
             if ($conf_UAM[25] <> -1)
             {
@@ -561,4 +604,5 @@
 
             // Change user privacy level
+            // -------------------------
             if ($conf_UAM[37] <> -1)
             {
@@ -572,7 +616,9 @@
 
             // Auto send email notification on group / status downgrade
+            // --------------------------------------------------------
             if (isset($conf_UAM[22]) and $conf_UAM[22] == 'true')
             {
               // Set reminder true
+              // -----------------
               $query = "
 UPDATE ".USER_LASTVISIT_TABLE."
@@ -583,4 +629,5 @@
             
               // Reset confirmed user status to unvalidated
+              // ------------------------------------------
 						  $query = '
 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
@@ -591,4 +638,5 @@
 
               // Get users information for email notification
+              // --------------------------------------------
 						  $query = '
 SELECT id, username, mail_address
@@ -603,5 +651,6 @@
           elseif ($reminder) // If user already reminded for ghost account
           {
-            // delete account
+            // Delete account
+            // --------------
             delete_user($user_id);
           }
@@ -643,4 +692,5 @@
 
   // Unvalidated accounts auto email sending and autodeletion if user already reminded
+  // ---------------------------------------------------------------------------------
   if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true'))
   {
@@ -648,7 +698,9 @@
   	{
       // Process if a non-admin nor webmaster user is logged
+      // ---------------------------------------------------
       if (in_array($user['id'], $collection))
     	{
         // Check ConfirmMail reminder state
+        // --------------------------------
         $query = '
 SELECT reminder
@@ -668,4 +720,5 @@
 
         // If never reminded before, send reminder and set reminder True
+        // -------------------------------------------------------------
         if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true')
         {
@@ -673,4 +726,5 @@
           
           // Get current user informations
+          // -----------------------------
           $query = "
 SELECT id, username, mail_address
@@ -684,4 +738,5 @@
 
         // If already reminded before, delete user
+        // ---------------------------------------
         if ($reminder)
         {
@@ -690,4 +745,5 @@
 
           // Logged-in user cleanup, session destruction and redirected to custom page
+          // -------------------------------------------------------------------------
           invalidate_user_cache();
           logout_user();
@@ -700,4 +756,5 @@
         {
           // Check reminder state
+          // --------------------
           $query = '
 SELECT reminder
@@ -717,4 +774,5 @@
 
           // If never reminded before, send reminder and set reminder True
+          // -------------------------------------------------------------
           if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true')
           {
@@ -722,4 +780,5 @@
           
             // Get current user informations
+            // -----------------------------
             $query = "
 SELECT id, username, mail_address
@@ -733,5 +792,6 @@
           elseif ($reminder) // If user already reminded for account validation
           {
-            // delete account
+            // Delete account
+            // --------------
             delete_user($user_id);
           }
@@ -756,4 +816,5 @@
 
 // Admin user management
+// ---------------------
   if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list')
   {
@@ -761,4 +822,5 @@
     {
       // Email without forbidden domains
+      // -------------------------------
       if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email']))
       {
@@ -824,4 +886,5 @@
 
 // We have to get the user's language in database
+// ----------------------------------------------
   $query ='
 SELECT user_id, language
@@ -832,7 +895,9 @@
 
 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language
+// -------------------------------------------------------------------------------------------------------------------------------
   if (empty($data))
   {
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
     $language = pwg_get_session_var( 'lang_switch', $user['language'] );
     switch_lang_to($language);
@@ -841,5 +906,6 @@
   {
 // And switch gallery to this language before using personalized and multilangual contents
-    $language = $data['language']; // Usefull for debugging
+// ---------------------------------------------------------------------------------------
+    //$language = $data['language']; // Usefull for debugging
     switch_lang_to($data['language']);
     load_language('plugin.lang', UAM_PATH);
@@ -855,4 +921,5 @@
       {
         // Management of Extension flags ([username], [mygallery], [myurl])
+        // ----------------------------------------------------------------
         $patterns[] = '#\[username\]#i';
         $replacements[] = $username;
@@ -907,5 +974,5 @@
   }
 
-  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm)
+  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ?
   {
     $infos2 = array
@@ -915,7 +982,8 @@
     );
 
-    if (isset($conf_UAM[9]) and $conf_UAM[9] <> '')
+    if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') // Add personal text in confirmation email ?
     {
       // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
+      // -------------------------------------------------------------------------
       $patterns[] = '#\[username\]#i';
       $replacements[] = $username;
@@ -965,4 +1033,5 @@
 
 // Sending the email with subject and contents
+// -------------------------------------------
   pwg_mail($email, array(
     'subject' => $subject,
@@ -971,4 +1040,5 @@
 
 // Switching back to default language
+// ----------------------------------
 switch_lang_back();
 }
@@ -992,4 +1062,5 @@
   
 // We have to get the user's language in database
+// ----------------------------------------------
   $query ='
 SELECT user_id, language
@@ -1001,4 +1072,5 @@
   
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
   switch_lang_to($data['language']);
    
@@ -1013,4 +1085,5 @@
       {
         // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
+        // -------------------------------------------------------------------------
         $patterns[] = '#\[username\]#i';
         $replacements[] = $username;
@@ -1039,5 +1112,6 @@
 			}
 
-// Set reminder true      
+// Set reminder true 
+// -----------------     
       $query = "
 UPDATE ".USER_CONFIRM_MAIL_TABLE."
@@ -1055,4 +1129,5 @@
       {
         // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
+        // -------------------------------------------------------------------------
         $patterns[] = '#\[username\]#i';
         $replacements[] = $username;
@@ -1075,5 +1150,6 @@
       }
       
-// Set reminder true      
+// Set reminder true
+// -----------------
       $query = "
 UPDATE ".USER_CONFIRM_MAIL_TABLE."
@@ -1092,4 +1168,5 @@
 
 // Switching back to default language
+// ----------------------------------
 switch_lang_back();
 }
@@ -1113,4 +1190,5 @@
 
 // We have to get the user's language in database
+// ----------------------------------------------
   $query ='
 SELECT user_id, language
@@ -1122,4 +1200,5 @@
 
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
   switch_lang_to($data['language']);
    
@@ -1131,4 +1210,5 @@
   {
     // Management of Extension flags ([username], [mygallery], [myurl], [days])
+    // ------------------------------------------------------------------------
     $patterns[] = '#\[username\]#i';
     $replacements[] = $username;
@@ -1158,4 +1238,5 @@
 
 // Switching back to default language
+// ----------------------------------
 switch_lang_back();
 }
@@ -1179,4 +1260,5 @@
 
 // We have to get the user's language in database
+// ----------------------------------------------
   $query ='
 SELECT user_id, language
@@ -1187,7 +1269,9 @@
 
 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language
+// -------------------------------------------------------------------------------------------------------------------------------
   if (empty($data))
   {
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
     $language = pwg_get_session_var( 'lang_switch', $user['language'] );
     switch_lang_to($language);
@@ -1196,4 +1280,5 @@
   {
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
     $language = $data['language']; // Usefull for debugging
     switch_lang_to($data['language']);
@@ -1206,4 +1291,5 @@
   {
     // Management of Extension flags ([username], [mygallery], [myurl])
+    // ----------------------------------------------------------------
     $patterns[] = '#\[username\]#i';
     $replacements[] = stripslashes($username);
@@ -1235,4 +1321,5 @@
 
 // Sending the email with subject and contents
+// -------------------------------------------
   pwg_mail($email, array(
     'subject' => $subject,
@@ -1241,4 +1328,5 @@
 
 // Switching back to default language
+// ----------------------------------
 switch_lang_back();
 }
@@ -1262,4 +1350,5 @@
 
 // We have to get the user's language in database
+// ----------------------------------------------
   $query ='
 SELECT user_id, language
@@ -1270,7 +1359,9 @@
 
 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language
+// -------------------------------------------------------------------------------------------------------------------------------
   if (empty($data))
   {
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
     $language = pwg_get_session_var( 'lang_switch', $user['language'] );
     switch_lang_to($language);
@@ -1279,4 +1370,5 @@
   {
 // And switch gallery to this language before using personalized and multilangual contents
+// ---------------------------------------------------------------------------------------
     $language = $data['language']; // Usefull for debugging
     switch_lang_to($data['language']);
@@ -1285,4 +1377,5 @@
 
 // Retreive users email and user name from id
+// ------------------------------------------
   $query ='
 SELECT id, username, mail_address
@@ -1297,4 +1390,5 @@
   {
     // Management of Extension flags ([username], [mygallery], [myurl])
+    // ----------------------------------------------------------------
     $patterns[] = '#\[username\]#i';
     $replacements[] = $result['username'];
@@ -1318,4 +1412,5 @@
 
 // Sending the email with subject and contents
+// -------------------------------------------
   pwg_mail($result['mail_address'], array(
     'subject' => $subject,
@@ -1324,4 +1419,5 @@
 
 // Switching back to default language
+// ----------------------------------
 switch_lang_back();
 }
@@ -1387,4 +1483,5 @@
 
     // Delete user from all groups
+    // ---------------------------
     $query = "
 DELETE FROM ".USER_GROUP_TABLE."
@@ -1399,4 +1496,5 @@
 
     // Set user unvalidated status
+    // ---------------------------
     if (!is_admin() and $conf_UAM[7] <> -1)
     {
@@ -1410,4 +1508,5 @@
 
     // Set user unvalidated group
+    // --------------------------
     if (!is_admin() and $conf_UAM[2] <> -1)
     {
@@ -1422,4 +1521,5 @@
 
     // Set user unvalidated privacy level
+    // ----------------------------------
     if (!is_admin() and $conf_UAM[35] <> -1)
     {
@@ -1451,4 +1551,5 @@
 
 // Groups cleanup
+// --------------
   $query = "
 DELETE FROM ".USER_GROUP_TABLE."
@@ -1661,7 +1762,9 @@
       {
 				// Verify Confirmmail with time limit ON
+        // -------------------------------------
 				if (isset ($conf_UAM_ConfirmMail[1]))
 				{
-					// dates formating and compare
+					// Dates formating and compare
+          // ---------------------------
 					$today = date("d-m-Y"); // Get today's date
 					list($day, $month, $year) = explode('-', $today); // explode date of today						 
@@ -1676,9 +1779,11 @@
 
 					// Condition with the value set for time limit
+          // -------------------------------------------
 					if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
 					{
 						list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
 
-            // Update ConfirmMail table 
+            // Update ConfirmMail table
+            // ------------------------
 						$query = '
 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
@@ -1689,5 +1794,6 @@
 
             // Update LastVisit table - Force reminder field to false
-            // Usefull when a user has been automatically downgraded and revalidate its registration  
+            // Usefull when a user has been automatically downgraded and revalidate its registration
+            // -------------------------------------------------------------------------------------
 						$query = '
 UPDATE '.USER_LASTVISIT_TABLE.'
@@ -1739,4 +1845,5 @@
 
 						// Refresh user's category cache
+            // -----------------------------
 						invalidate_user_cache();
   
@@ -1749,9 +1856,11 @@
 				}
 				// Verify Confirmmail with time limit OFF
+        // --------------------------------------
 				else
 				{
 					list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
 
-          // Update ConfirmMail table 
+          // Update ConfirmMail table
+          // ------------------------
 					$query = '
 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
@@ -1762,5 +1871,6 @@
 
           // Update LastVisit table - Force reminder field to false
-          // Usefull when a user has been automatically downgraded and revalidate its registration  
+          // Usefull when a user has been automatically downgraded and revalidate its registration
+          // -------------------------------------------------------------------------------------
 					$query = '
 UPDATE '.USER_LASTVISIT_TABLE.'
@@ -1819,4 +1929,5 @@
 
 					// Refresh user's category cache
+          // -----------------------------
 					invalidate_user_cache();
   
@@ -2039,11 +2150,14 @@
           
 	// Get ConfirmMail configuration
+  // -----------------------------
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
   // Get UAM configuration
+  // ---------------------
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
   $users = array();
 
-	// search users depending expiration date
+	// Search users depending expiration date
+  // --------------------------------------
   $query = '
 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
@@ -2092,5 +2206,6 @@
 	}
 
-	// add group lists
+	// Add groups list
+  // ---------------
   $user_ids = array();
   foreach ($users as $i => $user)
@@ -2136,4 +2251,5 @@
           
 	// Get ConfirmMail configuration
+  // -----------------------------
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
   
@@ -2141,4 +2257,5 @@
 
 	// search users depending expiration date
+  // --------------------------------------
   $query = '
 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
@@ -2176,5 +2293,6 @@
   $users = array();
 
-	// search users depending expiration date
+	// Search users depending expiration date
+  // --------------------------------------
   $query = '
 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
@@ -2199,5 +2317,6 @@
 	}
 
-	// add group lists
+	// Add groups list
+  // ---------------
   $user_ids = array();
   foreach ($users as $i => $user)
@@ -2224,5 +2343,6 @@
   $users = array();
   
-	// search users depending expiration date and reminder sent
+	// Search users depending expiration date and reminder sent
+  // --------------------------------------------------------
   $query = '
 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
@@ -2257,5 +2377,6 @@
   $users = array();
 
-	// search users depending expiration date
+	// Search users depending expiration date
+  // --------------------------------------
   $query = '
 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
@@ -2280,5 +2401,6 @@
 	}
 
-	// add group lists
+	// Add groups list
+  // ---------------
   $user_ids = array();
   foreach ($users as $i => $user)
@@ -2304,7 +2426,9 @@
           
 	// Get ConfirmMail configuration
+  // -----------------------------
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
           
 	// Get UAM configuration
+  // ---------------------
   $conf_UAM = unserialize($conf['UserAdvManager']);
 	
@@ -2320,5 +2444,6 @@
 	if (!empty($registration_date))
   {
-		// dates formating and compare
+		// Dates formating and compare
+    // ---------------------------
 		$today = date("d-m-Y"); // Get today's date
 		list($day, $month, $year) = explode('-', $today); // explode date of today						 
@@ -2333,4 +2458,5 @@
 
 		// Condition with the value set for time limit
+    // -------------------------------------------
 		if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
 		{
@@ -2358,4 +2484,5 @@
 
   // Initialisation des variables - Variables initiation
+  // ---------------------------------------------------
   $points = 0;
   $point_lowercase = 0;
@@ -2364,5 +2491,6 @@
   $point_characters = 0;
 
-  // On récupère la longueur du mot de passe - Getting password lengh	
+  // On récupère la longueur du mot de passe - Getting password lengh
+  // ----------------------------------------------------------------
   $length = strlen($password);
   
@@ -2372,4 +2500,5 @@
     // On sélectionne une à une chaque lettre - Select each letters
     // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn
+    // -------------------------------------------------------------------------
     $letters = $password[$i];
 
@@ -2377,7 +2506,9 @@
     {
       // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase
+      // ------------------------------------------------------------------------------
 		  $points = $points + 1;
 
 		  // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase
+      // --------------------------------------------------------------------------
 		  $point_lowercase = 1;
     }
@@ -2385,7 +2516,9 @@
     {
       // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase
+      // ------------------------------------------------------------------------------
       $points = $points + 2;
 		
       // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase
+      // --------------------------------------------------------------------------
       $point_uppercase = 2;
     }
@@ -2393,7 +2526,9 @@
     {
       // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers
+      // -------------------------------------------------------------------------
       $points = $points + 3;
 		
       // On rajoute le bonus pour un chiffre - Adding bonus points for numbers
+      // ---------------------------------------------------------------------
       $point_numbers = 3;
     }
@@ -2401,7 +2536,9 @@
     {
       // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters
+      // --------------------------------------------------------------------------------------------
       $points = $points + 5;
 		
       // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters
+      // ----------------------------------------------------------------------------------------
       $point_characters = 5;
     }
@@ -2409,13 +2546,17 @@
 
   // Calcul du coefficient points/longueur - calculating the coefficient points/length
+  // ---------------------------------------------------------------------------------
   $step1 = $points / $length;
 
   // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types...
+  // ---------------------------------------------------------------------------------------------------------------------
   $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters;
 
   // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length
+  // --------------------------------------------------------------------------------------------------------------------------------------------
   $score = $step1 * $step2;
 
   // Multiplication du resultat par la longueur de la chaine - Multiplying the result by the length of the string
+  // ------------------------------------------------------------------------------------------------------------
   $finalscore = $score * $length;
 
@@ -2486,4 +2627,5 @@
   }
 // IMPORTANT SECURITY !
+// --------------------
   $plugin = array_map('htmlspecialchars', $plugin);
 
@@ -2619,4 +2761,5 @@
 
   // Query to get informations in database
+  // -------------------------------------
   if (!empty($user_ids))
   {
@@ -2659,4 +2802,5 @@
   
   // Initial backup folder creation and file initialisation
+  // ------------------------------------------------------
   if (!is_dir(UAM_PATH.'/include/backup'))
     mkdir(UAM_PATH.'/include/backup');
@@ -2668,4 +2812,5 @@
 
   // Saving UAM specific tables
+  // --------------------------
   $ListTables = array(USER_CONFIRM_MAIL_TABLE, USER_LASTVISIT_TABLE);
   $j=0;
@@ -2708,4 +2853,5 @@
   
   // Saving UAM configuration
+  // ------------------------
   $insertions = "-- -------------------------------------------------------\n";
   $insertions .= "-- Insert UAM configuration in ".CONFIG_TABLE."\n";
@@ -2734,4 +2880,5 @@
 
   // Download generated dump file
+  // ----------------------------
   if ($download == 'true')
   {
Index: /extensions/UserAdvManager/trunk/include/upgradedb.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 12271)
@@ -29,8 +29,10 @@
 {  
   // Get current plugin version
+  // --------------------------
   $plugin =  PluginInfos(UAM_PATH);
   $version = $plugin['version'];
 
   // Update plugin version in #_config table
+  // ---------------------------------------
   $query = '
 UPDATE '.CONFIG_TABLE.'
@@ -45,4 +47,5 @@
 // Check #_plugin table consistency
 // Only useful if a previous version upgrade has not worked correctly (rare case)
+// ------------------------------------------------------------------------------
   $query = '
 SELECT version
@@ -133,4 +136,5 @@
 {
   // Create missing table
+  // --------------------
   $query = "
 ALTER TABLE ".USER_CONFIRM_MAIL_TABLE."
@@ -141,4 +145,5 @@
 
   // Upgrade plugin configuration
+  // ----------------------------
 	global $conf;
 
@@ -191,4 +196,5 @@
 
   // Changing parameter name
+  // -----------------------
   $q = '
 UPDATE '.CONFIG_TABLE.'
@@ -206,4 +212,5 @@
 
   // Upgrading ConfirmMail options
+  // -----------------------------
   $query = '
 SELECT value
@@ -235,4 +242,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -289,4 +297,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -313,4 +322,5 @@
 
   // Insert a new config entry for futur plugin's version check
+  // ----------------------------------------------------------
   $query = '
 INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
@@ -329,4 +339,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -352,4 +363,5 @@
 
   // Create new UAM entry in plugins table
+  // -------------------------------------
   $uam_new_version = "2.20.0";
 
@@ -361,5 +373,6 @@
   pwg_query($query);
 
-  // Delete old plugin entry in plugins table 
+  // Delete old plugin entry in plugins table
+  // ----------------------------------------
   $query = '
 DELETE FROM '.PLUGINS_TABLE.'
@@ -370,5 +383,6 @@
   pwg_query($query);
 
-  // rename directory
+  // Rename directory
+  // ----------------
   if (!rename(PHPWG_PLUGINS_PATH.'NBC_UserAdvManager', PHPWG_PLUGINS_PATH.'UserAdvManager'))
   {
@@ -384,4 +398,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -409,4 +424,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -435,4 +451,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -447,4 +464,5 @@
 
   // Refactoring all configuration options
+  // -------------------------------------
   $Newconf_UAM[0] = $Newconf_UAM[0];
   $Newconf_UAM[1] = $Newconf_UAM[1];
@@ -484,4 +502,5 @@
   
   // unset obsolete conf
+  // -------------------
   unset ($Newconf_UAM[35]);
   unset ($Newconf_UAM[36]);
@@ -501,4 +520,5 @@
 
   // Upgrading options
+  // -----------------
   $query = '
 SELECT value
@@ -522,4 +542,5 @@
 
   // Piwigo's native tables modifications for password reset function - Add pwdreset column
+  // --------------------------------------------------------------------------------------
   $query = '
 SHOW COLUMNS FROM '.USERS_TABLE.'
Index: /extensions/UserAdvManager/trunk/language/en_UK/help.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/en_UK/help.lang.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/language/en_UK/help.lang.php	(revision 12271)
@@ -331,5 +331,5 @@
 ...
 ';
-$lang['UAM_miscTitle'] = 'Other miscellaneous options';
+$lang['UAM_miscTitle'] = 'Miscellaneous options';
 $lang['UAM_miscTitle_d'] = '
 - Registered users monitoring<br>
Index: /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 12271)
@@ -343,5 +343,5 @@
 $lang['UAM_MiscOptions'] = 'Other miscellaneous options';
 $lang['UAM_Title3'] = 'Ghost users management';
-$lang['UAM_Title5'] = 'Other miscellaneous options';
+$lang['UAM_Title5'] = 'Miscellaneous options';
 $lang['UAM_Password_Reset_Msg'] = 'Please, change your password!';
 $lang['UAM_PwdReset'] = 'Password renewal';
@@ -357,4 +357,39 @@
 $lang['UAM %d user pwdreseted'] = 'Password renewal required for %d user';
 $lang['UAM %d users pwdreseted'] = 'Password renewal required for %d users';
+$lang['UAM_Error_Using_illegal_Kdays'] = 'Using the [Kdays] tag is allowed only if the deadline for registration validation limited is active. Refer to the text field in red to correct the problem.';
+$lang['UAM_Default_InfoMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery].
+
+Please, find find below your connexion information.';
+$lang['UAM_Default_ConfirmMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery].
+
+To complete the procedure and be able to browse through the pictures, thank you kindly confirm your registration by clicking on the link in this message.';
+$lang['UAM_Default_GhstReminder_Txt'] = 'Hello [username].
+	
+This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted.
+
+On receipt of this message and no new visit within [days] days, we would be obliged to automatically delete your account.
+
+Best regards,
+
+The admin of the gallery [mygallery] - [myurl]';
+$lang['UAM_Default_GhstDeletion_Txt'] = 'Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery]. Please register again.';
+$lang['UAM_Default_GhstDemotion_Txt'] = '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:';
+$lang['UAM_Default_AdminValidation_Txt'] = 'Hello [username]! Thank you for registering and welcome to [mygallery].
+
+Your account has been manually validated by the webmaster of [mygallery]. You may now log in at [myurl] and make any appropriate changes to your profile.';
+$lang['UAM_Default_PwdRequest_Txt'] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.';
+$lang['UAM_Default_ValidationTimeout_Txt'] = 'Sorry, your account has been deleted because you have not validated your registration in requested time ([Kdays] days). Please, retry registration with a valid and non blocked email account.';
+$lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Hello [username].
+		
+This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again x days to validate your registration.
+
+Note: After this period, your account will be permanently deleted.';
+$lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Hello [username].
+
+This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have x days to confirm your registration by clicking on the link in the message you should have received when you registered.
+
+Note: After this period, your account will be permanently deleted.';
+$lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Welcome [username]! You have confirmed that you are human and may now use [mygallery]!';
+$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.';
 // --------- End: New or revised $lang ---- from version 2.30.0
 ?>
Index: /extensions/UserAdvManager/trunk/language/fr_FR/help.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/fr_FR/help.lang.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/language/fr_FR/help.lang.php	(revision 12271)
@@ -327,5 +327,5 @@
 ...
 ';
-$lang['UAM_miscTitle'] = 'Autres options diverses';
+$lang['UAM_miscTitle'] = 'Autres options';
 $lang['UAM_miscTitle_d'] = '
 - Suivi des visiteurs inscrits<br>
Index: /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 12271)
@@ -340,5 +340,5 @@
 $lang['UAM_MiscOptions'] = 'Autres options';
 $lang['UAM_Title3'] = 'Gestion des utilisateurs fantômes';
-$lang['UAM_Title5'] = 'Autres options diverses';
+$lang['UAM_Title5'] = 'Autres options';
 $lang['UAM_Password_Reset_Msg'] = 'Veuillez modifier votre mot de passe !';
 $lang['UAM_PwdReset'] = 'Renouvellement du mot de passe';
@@ -354,4 +354,39 @@
 $lang['UAM %d user pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateur';
 $lang['UAM %d users pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateurs';
+$lang['UAM_Error_Using_illegal_Kdays'] = 'L\'utilisation de la balise [Kdays] n\'est autorisée que si la limitation du délai de validation d\'inscription est active. Reportez vous au champ de texte en rouge pour corriger le problème.';
+$lang['UAM_Default_InfoMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery].
+
+Vous trouverez ci-dessous vos informations de connexion sur la galerie.';
+$lang['UAM_Default_ConfirmMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery].
+
+Pour terminer la procédure et pouvoir parcourir l\'ensemble des photos, merci de bien vouloir valider votre inscription en cliquant sur le lien dans ce message.';
+$lang['UAM_Default_GhstReminder_Txt'] = 'Bonjour [username].
+	
+Ceci est un message de rappel car cela fait longtemps que vous n\'êtes pas revenu visiter la galerie [mygallery]. Si vous ne souhaitez plus utiliser votre compte d\'accès, merci de bien vouloir nous le faire savoir en répondant à ce message. Votre compte sera alors immédiatement détruit.
+
+A la réception de ce présent message et sans nouvelle visite de votre part sous [days] jours, nous serions dans l\'obligation de supprimer automatiquement votre compte.
+
+Cordialement,
+
+L\'administrateur de la galerie [mygallery] - [myurl]';
+$lang['UAM_Default_GhstDeletion_Txt'] = 'Désolé [username], votre compte a été supprimé automatiquement pour cause de délai dépassé depuis votre dernière visite à [mygallery]. Veuillez vous réinscrire.';
+$lang['UAM_Default_GhstDemotion_Txt'] = 'Désolé [username], votre compte a été rétrogradé pour cause de dépassement de délai depuis votre dernière visite à [mygallery]. Veuillez revalider votre inscription en cliquant sur le lien suivant :';
+$lang['UAM_Default_AdminValidation_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery].
+
+Votre inscription a été validée manuellement par l\'administrateur de [mygallery]. Vous pouvez maintenant vous connecter à [myurl] et modifier vos informations de profil.';
+$lang['UAM_Default_PwdRequest_Txt'] = 'Vous avez demandé le renouvellement de votre mot de passe. Veuillez trouver ci-dessous vos nouvelles informations de connexion.';
+$lang['UAM_Default_ValidationTimeout_Txt'] = 'Désolé, votre accès a été supprimé car vous n\'avez pas validé votre inscription dans le temps imparti ([Kdays] jours). Merci de vous réinscrire en prenant garde d\'utiliser une adresse de messagerie valide et accessible.';
+$lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Bonjour [username].
+		
+Ceci est un message de rappel car vous n\'avez pas validé votre inscription sur [mygallery] et votre clé de validation a expiré. Pour vous permettre d\'accéder à notre galerie, votre période de validation a été réinitialisée. Vous avez donc un nouveau délai de x jours pour valider votre inscription.
+
+Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.';
+$lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Bonjour [username].
+
+Ceci est un message de rappel car vous vous êtes inscrit sur notre galerie [mygallery] mais vous n\'avez pas encore validé cette inscription et le délai va bientôt expirer. Un délai supplémentaire de x jours vous est accordé. Veuillez cliquer sur le lien de confirmation que vous avez reçu lors de votre inscription.
+
+Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.';
+$lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Bienvenue [username]! Vous avez confirmé que vous étiez bien un humain et non une machine. Vous pouvez maintenant profiter pleinement de [mygallery]!';
+$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Votre clé d\'activation est incorrecte ou expirée ou vous avez déjà validé votre inscription. Merci de contacter le webmestre de la galerie pour résoudre le problème.';
 // --------- End: New or revised $lang ---- from version 2.30.0
 ?>
Index: /extensions/UserAdvManager/trunk/main.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/main.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/main.inc.php	(revision 12271)
@@ -29,16 +29,21 @@
 
 // Plugin administration panel
+// ---------------------------
 add_event_handler('get_admin_plugin_menu_links', 'UAM_admin_menu');
 
-/* Lastvisit table feed for Ghost Tracker */
+// Lastvisit table feed for Ghost Tracker
+// --------------------------------------
 add_event_handler('loc_begin_index', 'UAM_GhostTracker');
 
 // User creation
+// -------------
 add_event_handler('register_user', 'UAM_Adduser');
 
 // User deletion
+// -------------
 add_event_handler('delete_user', 'UAM_Deluser');
 
 // Check users registration
+// ------------------------
 add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
 
@@ -49,13 +54,17 @@
 
 // Redirection to profile page
+// ---------------------------
 add_event_handler('login_success', 'UAM_LoginTasks');
 
 // Adding customized text to lost password email
+// ---------------------------------------------
 add_event_handler('render_lost_password_mail_content', 'UAM_lost_password_mail_content');
 
 // *** Important ! This is necessary to make email exclusion work in admin's users management panel ***
+// ----------------------------------------------------------------------------------------------------
 add_event_handler('init', 'UAM_InitPage');
 
 // PWG_Stuffs module
+// -----------------
 if ((isset($conf_UAM[33]) and $conf_UAM[33] == 'true'))
 {
@@ -64,12 +73,19 @@
 
 // Add new feature in user_list - Password Reset
+// ---------------------------------------------
 if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true'))
 {
-  // add new column on user_list
+  // Add new column on user_list
+  // ---------------------------
   add_event_handler('loc_visible_user_list', 'UAM_loc_visible_user_list');
 
-  //add prefilter on user_list
+  // Add prefilter on user_list
+  // --------------------------
   add_event_handler('loc_begin_admin', 'UAM_PwdReset_Action',60);
-  
+
+  /**
+   * UAM_PwdReset_Action - Triggered on UAM_PwdReset_Action
+   * Handle passord reset action in user_list.php
+   */
   function UAM_PwdReset_Action()
   {
@@ -170,4 +186,8 @@
   }
 
+  /**
+   * UAM_PwdReset_Prefilter
+   * Adds action field for password reset in user_list.tpl
+   */
   function UAM_PwdReset_Prefilter($content, &$smarty)
   {
Index: /extensions/UserAdvManager/trunk/maintain.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/maintain.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/maintain.inc.php	(revision 12271)
@@ -9,4 +9,6 @@
 include_once (UAM_PATH.'include/functions.inc.php');
 
+load_language('plugin.lang', UAM_PATH);
+
 
 function plugin_install()
@@ -18,27 +20,61 @@
 /* ****************************************************************** */
 
+  $defaultUAM = array();
+  $defaultConfirmMail = array();
+
   // Default global parameters for UserAdvManager conf
-  $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username].
-	
-This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted.
-
-On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account.
-
-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.','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','false','false',-1,-1,-1,'false');
-
+  // -------------------------------------------------
+  $defaultUAM[0] = 'false';                                   // UAM_MAIL_INFO_TRUE/FALSE
+  $defaultUAM[1] = 'false';                                   // UAM_CONFIRM_MAIL_TRUE/FALSE
+  $defaultUAM[2] = '-1';                                      // UAM_No_Confirm_Group
+  $defaultUAM[3] = '-1';                                      // UAM_Validated_Group
+  $defaultUAM[4] = '-1';                                      // UAM_Validated_Status
+  $defaultUAM[5] = 'false';                                   // UAM_USERNAME_CHAR_TRUE
+  $defaultUAM[6] = '';                                        // UAM_USERNAME_CHAR_LIST
+  $defaultUAM[7] = '-1';                                      // UAM_No_Confirm_Status
+  $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt');          // UAM_MAILINFO_TEXT
+  $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt');       // UAM_CONFIRMMAIL_TEXT
+  $defaultUAM[10] = 'false';                                  // UAM_MAILEXCLUSION_TRUE/FALSE
+  $defaultUAM[11] = '';                                       // UAM_MAILEXCLUSION_LIST
+  $defaultUAM[12] = 'false';                                  // UAM_PASSWORDENF_TRUE/FALSE
+  $defaultUAM[13] = '100';                                    // UAM_PASSWORD_SCORE
+  $defaultUAM[14] = 'false';                                  // UAM_ADMINPASSWENF_TRUE/FALSE
+  $defaultUAM[15] = 'false';                                  // UAM_GHOSTRACKER_TRUE/FALSE
+  $defaultUAM[16] = '10';                                     // UAM_GHOSTRACKER_DAYLIMIT
+  $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt');     // UAM_GHOSTRACKER_REMINDERTEXT
+  $defaultUAM[18] = 'false';                                  // UAM_ADDLASTVISIT_TRUE/FALSE
+  $defaultUAM[19] = 'false';                                  // UAM_ADMINCONFMAIL_TRUE/FALSE
+  $defaultUAM[20] = 'false';                                  // UAM_REDIRTOPROFILE_TRUE/FALSE
+  $defaultUAM[21] = 'false';                                  // UAM_GTAUTO_TRUE/FALSE
+  $defaultUAM[22] = 'false';                                  // UAM_GTAUTOMAIL_TRUE/FALSE
+  $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt');     // UAM_GTAUTODEL_TEXT
+  $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt');     // UAM_GTAUTOMAILTEXT
+  $defaultUAM[25] = '-1';                                     // UAM_Downgrade_Group
+  $defaultUAM[26] = '-1';                                     // UAM_Downgrade_Status
+  $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt');  // UAM_ADMINVALIDATIONMAIL_TEXT
+  $defaultUAM[28] = 'false';                                  // UAM_CUSTOMPASSWRETR_TRUE/FALSE
+  $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt');       // UAM_CUSTOMPASSWRETR_TEXT
+  $defaultUAM[30] = 'false';                                  // UAM_USRAUTO_TRUE/FALSE
+  $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');// UAM_USRAUTODEL_TEXT
+  $defaultUAM[32] = 'false';                                  // UAM_USRAUTOMAIL_TRUE/FALSE
+  $defaultUAM[33] = 'false';                                  // UAM_STUFFS_TRUE/FALSE
+  $defaultUAM[34] = 'false';                                  // UAM_HIDEPASSW_TRUE/FALSE
+  $defaultUAM[35] = '-1';                                     // UAM_NO_VALID_LEVEL
+  $defaultUAM[36] = '-1';                                     // UAM_VALID_LEVEL
+  $defaultUAM[37] = '-1';                                     // UAM_DOWNGRADE_LEVEL
+  $defaultUAM[38] = 'false';                                  // UAM_PWDRESET_TRUE/FALSE
+  
   // Default specific parameters for UserAdvManager ConfirmMail conf
-  $default2 = array('false',5,'Hello [username].
-		
-This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.
-
-Note: After this period, your account will be permanently deleted.','false','Hello [username].
-
-This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.
-
-Note: After this period, your account will be permanently deleted.','You have confirmed that you are human and may now use [mygallery]! Welcome [username]!','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.');
-
+  // ---------------------------------------------------------------
+  $defaultConfirmMail[0] = 'false';                                 // UAM_CONFIRMMAIL_TIMEOUT_TRUE/FALSE
+  $defaultConfirmMail[1] = '5';                                     // UAM_CONFIRMMAIL_DELAY
+  $defaultConfirmMail[2] = l10n('UAM_Default_CfmMail_Remail_Txt1'); // UAM_CONFIRMMAIL_REMAIL_TXT1
+  $defaultConfirmMail[3] = 'false';                                 // UAM_CONFIRMMAIL_REMAIL_TRUE/FALSE
+  $defaultConfirmMail[4] = l10n('UAM_Default_CfmMail_Remail_Txt2'); // UAM_CONFIRMMAIL_REMAIL_TXT2
+  $defaultConfirmMail[5] = l10n('UAM_Default_CfmMail_Custom_Txt1'); // UAM_CONFIRMMAIL_CUSTOM_TXT1
+  $defaultConfirmMail[6] = l10n('UAM_Default_CfmMail_Custom_Txt2'); // UAM_CONFIRMMAIL_CUSTOM_TXT2
+  
   // Set current plugin version in config table
+  // ------------------------------------------
   $plugin =  PluginInfos(UAM_PATH);
   $version = $plugin['version'];
@@ -54,4 +90,5 @@
 
   // Create UserAdvManager conf if not already exists
+  // ------------------------------------------------
 	$query = '
 SELECT param
@@ -65,5 +102,5 @@
     $q = '
 INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
-VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($default1)).'","UAM parameters")
+VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($defaultUAM)).'","UAM parameters")
   ;';
     pwg_query($q);
@@ -71,4 +108,5 @@
 
   // Create UserAdvManager_ConfirmMail conf if not already exists
+  // ------------------------------------------------------------
 	$query = '
 SELECT param
@@ -82,5 +120,5 @@
     $q = '
 INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
-VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($default2)).'","UAM ConfirmMail parameters")
+VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($defaultConfirmMail)).'","UAM ConfirmMail parameters")
   ;';
     pwg_query($q);
@@ -88,4 +126,5 @@
 
   // Create UserAdvManager_Redir conf if not already exists
+  // ------------------------------------------------------
 	$query = '
 SELECT param
@@ -105,4 +144,5 @@
 
   // Create UserAdvManager_Version conf if not already exists
+  // --------------------------------------------------------
 	$query = '
 SELECT param
@@ -122,4 +162,5 @@
 
   // Create USER_CONFIRM_MAIL_TABLE
+  // ------------------------------
 	$q = "
 CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." (
@@ -136,4 +177,5 @@
 
   // Create USER_LASTVISIT_TABLE
+  // ---------------------------
 	$q = "
 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." (
@@ -147,4 +189,5 @@
 
   // Piwigo's native tables modifications for password reset function - Add pwdreset column if not already exists
+  // ------------------------------------------------------------------------------------------------------------
   $query = '
 SHOW COLUMNS FROM '.USERS_TABLE.'
@@ -277,4 +320,5 @@
 
 /* Check database upgrade since version 2.16.0 */
+/* ******************************************* */
   if (isset($conf['UserAdvManager_Version']))
   {
@@ -316,4 +360,5 @@
 
   // Update plugin version number in #_config table and check consistency of #_plugins table
+  // ---------------------------------------------------------------------------------------
   UAM_version_update();
 
Index: /extensions/UserAdvManager/trunk/stuffs_module/config.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/stuffs_module/config.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/stuffs_module/config.inc.php	(revision 12271)
@@ -5,10 +5,12 @@
 if (!isset($datas)) $datas = '';
 
-// Enregistrement de la configuration
+// set configuration
+// -----------------
 if (isset($_POST['submit']) and !is_adviser()) {
   $datas = stripslashes($_POST['personal_content']);
 }
 
-// Parametrage du template
+// Template init
+// -------------
 $template->assign('cat_style', array());
 $template->assign(array('PERSONAL_CONTENT' => $datas));
Index: /extensions/UserAdvManager/trunk/stuffs_module/main.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/stuffs_module/main.inc.php	(revision 12270)
+++ /extensions/UserAdvManager/trunk/stuffs_module/main.inc.php	(revision 12271)
@@ -6,4 +6,5 @@
 
 // Extended description
+// --------------------
 if (function_exists('get_extended_desc'))
 {
