Index: /extensions/NBC_UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 4415)
@@ -111,4 +111,7 @@
             Code refactory and improvements.
             Translations improvements.
+
+-- 2.13.1 : Bug 1302 fixed - Re-coded double email check on registration.
+            Bug 1304 fixed - Adding of plugin version in plugin admin panel title.
 */
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 4415)
@@ -7,5 +7,4 @@
 
 /* Global Configuration Tab */
-$lang['Title_Tab1'] = 'UserAdvManager - Allgemeine Einstellungen';
 $lang['Tab_Global'] = 'Allgemeine Einstellungen';
 $lang['UserAdvManager_Mail_Info'] = ' Mail Informationen an den Benutzer';
@@ -199,5 +198,4 @@
 /* ConfirmMail Configuration Tab */
 $lang['ConfirmMail_Title'] = 'Erweiterte Einstellungen für die Validierung der Register';
-$lang['Title_Tab2'] = 'UserAdvManager - Registrieren Validierung Einstellungen';
 $lang['Tab_ConfirmMail'] = 'Register Validierung Einstellungen';
 /* UserList Tab */
@@ -240,3 +238,9 @@
 $lang['Err_Userlist_Settings'] = 'Diese Seite ist nur verfügbar, wenn "Benutzer Monitoring" ist im "General Setup" aktiv ist.';
 // --------- End: New or revised $lang ---- from version 2.13.0
+// --------- Starting below: New or revised $lang ---- from version 2.13.1
+/* Global Configuration Tab */
+$lang['Title_Tab1'] = 'UserAdvManager 2.13.1 - Allgemeine Einstellungen';
+/* ConfirmMail Configuration Tab */
+$lang['Title_Tab2'] = 'UserAdvManager 2.13.1 - Registrieren Validierung Einstellungen';
+// --------- End: New or revised $lang ---- from version 2.13.1
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 4415)
@@ -7,5 +7,4 @@
 
 /* Global Configuration Tab */
-$lang['Title_Tab1'] = 'UserAdvManager - General Setup';
 $lang['Tab_Global'] = 'General Setup';
 $lang['UserAdvManager_Mail_Info'] = ' Mail information to user:';
@@ -199,5 +198,4 @@
 /* ConfirmMail Configuration Tab */
 $lang['ConfirmMail_Title'] = 'Advanced settings for validation of registries';
-$lang['Title_Tab2'] = 'UserAdvManager - Register validation settings';
 $lang['Tab_ConfirmMail'] = 'Register validation settings';
 /* UserList Tab */
@@ -240,3 +238,9 @@
 $lang['Err_Userlist_Settings'] = 'This page is available only if "Users monitoring" is active in the "General Setup" tab.';
 // --------- End: New or revised $lang ---- from version 2.13.0
+// --------- Starting below: New or revised $lang ---- from version 2.13.1
+/* Global Configuration Tab */
+$lang['Title_Tab1'] = 'UserAdvManager 2.13.1 - General Setup';
+/* ConfirmMail Configuration Tab */
+$lang['Title_Tab2'] = 'UserAdvManager 2.13.1 - Register validation settings';
+// --------- End: New or revised $lang ---- from version 2.13.1
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 4415)
@@ -7,5 +7,4 @@
 
 /* Global Configuration Tab */
-$lang['Title_Tab1'] = 'UserAdvManager - Configuración general';
 $lang['Tab_Global'] = 'Configuración general';
 $lang['UserAdvManager_Mail_Info'] = ' Información por correo electrónico para el usuario:';
@@ -199,5 +198,4 @@
 /* ConfirmMail Configuration Tab */
 $lang['ConfirmMail_Title'] = 'Ajustes avanzados para la validación de usuarios registrados';
-$lang['Title_Tab2'] = 'UserAdvManager - Configuración de validación de registro';
 $lang['Tab_ConfirmMail'] = 'Configuración de validación de registro';
 /* UserList Tab */
@@ -240,3 +238,9 @@
 $lang['Err_Userlist_Settings'] = 'Esta página está disponible sólo si los "usuarios de seguimiento" está activo en la pestaña "General Setup".';
 // --------- End: New or revised $lang ---- from version 2.13.0
+// --------- Starting below: New or revised $lang ---- from version 2.13.1
+/* Global Configuration Tab */
+$lang['Title_Tab1'] = 'UserAdvManager 2.13.1 - Configuración general';
+/* ConfirmMail Configuration Tab */
+$lang['Title_Tab2'] = 'UserAdvManager 2.13.1 - Configuración de validación de registro';
+// --------- End: New or revised $lang ---- from version 2.13.1
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 4415)
@@ -7,5 +7,4 @@
 
 /* Global Configuration Tab */
-$lang['Title_Tab1'] = 'UserAdvManager - Configuration Générale';
 $lang['Tab_Global'] = 'Configuration Générale';
 $lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur :';
@@ -199,5 +198,4 @@
 /* ConfirmMail Configuration Tab */
 $lang['ConfirmMail_Title'] = 'Configuration avancée de la validation des inscriptions';
-$lang['Title_Tab2'] = 'UserAdvManager - Configuration de la validation des inscriptions';
 $lang['Tab_ConfirmMail'] = 'Configuration des validations';
 /* UserList Tab */
@@ -240,3 +238,9 @@
 $lang['Err_Userlist_Settings'] = 'Cette page n\'est accessible que si le "suivi des utilisateur" est actif dans l\'onglet "Configuration Générale".';
 // --------- End: New or revised $lang ---- from version 2.13.0
+// --------- Starting below: New or revised $lang ---- from version 2.13.1
+/* Global Configuration Tab */
+$lang['Title_Tab1'] = 'UserAdvManager 2.13.1 - Configuration Générale';
+/* ConfirmMail Configuration Tab */
+$lang['Title_Tab2'] = 'UserAdvManager 2.13.1 - Configuration de la validation des inscriptions';
+// --------- End: New or revised $lang ---- from version 2.13.1
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 4415)
@@ -7,5 +7,4 @@
 
 /* Global Configuration Tab */
-$lang['Title_Tab1'] = 'UserAdvManager - General Setup';
 $lang['Tab_Global'] = 'General Setup';
 $lang['UserAdvManager_Mail_Info'] = 'Informazioni di posta per l\'utente:';
@@ -212,5 +211,4 @@
 /* ConfirmMail Configuration Tab */;
 $lang['ConfirmMail_Title'] = 'Impostazioni avanzate per la convalida degli utenti registrati';
-$lang['Title_Tab2'] = 'UserAdvManager - Registrati impostazioni di convalida';
 $lang['Tab_ConfirmMail'] = 'Registrati impostazioni di convalida';
 /* UserList Tab */
@@ -253,3 +251,9 @@
 /* TODO */$lang['Err_Userlist_Settings'] = 'This page is available only if "Users monitoring" is active in the "General Setup" tab.';
 // --------- End: New or revised $lang ---- from version 2.13.0
+// --------- Starting below: New or revised $lang ---- from version 2.13.1
+/* Global Configuration Tab */
+$lang['Title_Tab1'] = 'UserAdvManager 2.13.1 - Configurazione generale';
+/* ConfirmMail Configuration Tab */
+$lang['Title_Tab2'] = 'UserAdvManager 2.13.1 - Registrati impostazioni di convalida';
+// --------- End: New or revised $lang ---- from version 2.13.1
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/main.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4414)
+++ /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4415)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: NBC UserAdvManager
-Version: 2.13.0
+Version: 2.13.1
 Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
@@ -174,4 +174,52 @@
   {
     return l10n('reg_err_login5');
+  }
+  
+  if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') /* not the same email variable if we are on users registration page or on admin's user registration page*/
+  {
+  /* Email doblons check */
+    $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
+    $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
+    $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
+  
+    if (!preg_match($regex, $_POST['email']))
+    {
+      return l10n('reg_err_mail_address');
+    }
+    
+    $query = '
+SELECT count(*)
+FROM '.USERS_TABLE.'
+WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['email'].'\')
+;';
+    list($count) = mysql_fetch_array(pwg_query($query));
+    if ($count != 0)
+    {
+      return l10n('reg_err_mail_address_dbl');
+    }
+  }
+
+  if (script_basename() == 'register') /* not the same email variable if we are on users registration page or on admin's user registration page*/
+  {
+  /* Email doblons check */
+    $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
+    $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
+    $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
+  
+    if (!preg_match($regex, $_POST['mail_address']))
+    {
+      return l10n('reg_err_mail_address');
+    }
+    
+    $query = '
+SELECT count(*)
+FROM '.USERS_TABLE.'
+WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['mail_address'].'\')
+;';
+    list($count) = mysql_fetch_array(pwg_query($query));
+    if ($count != 0)
+    {
+      return l10n('reg_err_mail_address_dbl');
+    }
   }
 /* ****************************************** */
