Index: extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 4249)
+++ extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 4281)
@@ -18,14 +18,20 @@
   {
     case 1:
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Add of %s', $username));
+      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Add of %s', stripslashes($username)));
       $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
       
-      if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '')
-        $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
+      if (isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '')
+      {
+        if (function_exists('get_user_language_desc'))
+        {
+          $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
+        }
+        else $infos1_perso = l10n($conf_nbc_UserAdvManager[10])."\n\n"; 
+      }
       
       break;
       
     case 2:
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
+      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username)));
       $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
 
@@ -33,5 +39,5 @@
         
     case 3:
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
+      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username)));
       $password = $password <> '' ? $password : l10n('UserAdvManager_no_update_pwd');
 
@@ -42,6 +48,6 @@
   {
     $infos1 = array(
-      get_l10n_args('infos_mail %s', $username),
-      get_l10n_args('User: %s', $username),
+      get_l10n_args('infos_mail %s', stripslashes($username)),
+      get_l10n_args('User: %s', stripslashes($username)),
       get_l10n_args('Password: %s', $password),
       get_l10n_args('Email: %s', $email),
@@ -59,6 +65,12 @@
     );
 
-    if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '')
-      $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
+    if (isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '')
+    {
+      if (function_exists('get_user_language_desc'))
+      {
+        $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
+      }
+      else $infos2_perso = l10n($conf_nbc_UserAdvManager[11])."\n\n";
+    }
   }
 
@@ -106,27 +118,38 @@
   {
     case 1:
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_with_key_of_%s', $username));
-      
-      if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and $confirm)
+      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_with_key_of_%s', stripslashes($username)));
+      
+      if (isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and $confirm)
       {
-				$infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
-			
-				$infos2 = array
-				(
-					get_l10n_args('Link: %s', ResetConfirmMail($user_id)),
-					get_l10n_args('', ''),
-				);
+        if (function_exists('get_user_language_desc'))
+        {
+          $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+        }
+				else $infos1 = l10n($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+
+        $infos2 = array
+        (
+          get_l10n_args('Link: %s', ResetConfirmMail($user_id)),
+          get_l10n_args('', ''),
+        );        
 			}
+      
 		break;
       
     case 2:
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_without_key_of_%s', $username));
-      
-      if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and !$confirm)
+      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_without_key_of_%s', stripslashes($username)));
+      
+      if (isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and !$confirm)
       {
-				$infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+        if (function_exists('get_user_language_desc'))
+        {
+          $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+        }
+        else $infos1 = l10n($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";				
       }
+      
     break;
 	}
+  
   pwg_mail($email, array(
     'subject' => $subject,
@@ -155,9 +178,14 @@
 	$infos1_perso = "";
 
-  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', $username));
-      
-  if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true')
-  {
-    $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n";
+  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', stripslashes($username)));
+      
+  if (isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true')
+  {
+    if (function_exists('get_user_language_desc'))
+    {
+      $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n";
+    }
+    else $infos1 = l10n($conf_nbc_UserAdvManager[19])."\n\n";
+    
     resetlastvisit($user_id);
   }
@@ -588,5 +616,5 @@
     list($username) = mysql_fetch_row(pwg_query($query));
 
-    return isset($username) ? $username : '';
+    return isset($username) ? stripslashes($username) : '';
   }
 }
Index: extensions/NBC_UserAdvManager/trunk/main.inc.php
===================================================================
--- extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4249)
+++ extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4281)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: NBC UserAdvManager
-Version: 2.12.6
+Version: 2.12.7
 Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
@@ -99,4 +99,7 @@
 -- 2.12.6 : Bug 1236 fixed -  Admins was unable to add a new user in the user_list page.
             Beginning of IT translations
+            
+-- 2.12.7 : Bug 1238 fixed -  Simple custom email text wasn't send when Extended Description plugin wasn't set.
+            Ending of IT translations
 */
 
