Index: /extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 4184)
+++ /extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php	(revision 4185)
@@ -21,5 +21,5 @@
       $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] <> '' )
+      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";
       
@@ -39,5 +39,5 @@
   }
 
-  if ( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true' )
+  if (isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true')
   {
     $infos1 = array(
@@ -59,5 +59,5 @@
     );
 
-    if ( function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '' )
+    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";
   }
Index: /extensions/NBC_UserAdvManager/trunk/main.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4184)
+++ /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 4185)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: NBC UserAdvManager
-Version: 2.12.3
+Version: 2.12.4
 Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
@@ -48,5 +48,8 @@
 							split replace by preg_split
 				
--- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin 
+-- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin
+
+
+ ***** Plugin history (branch 2.11)***** 
 
 -- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Renew validation key, list unvalidated users,...)
@@ -70,4 +73,7 @@
 -- 2.11.5 : Bug 1195 fixed : Registration displays the good title
 
+
+ ***** Plugin history (branch 2.12)*****
+
 -- 2.12.0 : Bug 1206 fixed : All plugin functionnalities work in user's profile page
                 Plugin's core code and admin panel refactoring
@@ -82,5 +88,8 @@
             Some code beautify (SQL requests and HTML 4 strict for tpl)
 
--- 2.12.3 : Bug 1226 fixed - "duplicate key error" when lastvisit table is not empty and on using Ghost Tracker init function 
+-- 2.12.3 : Bug 1226 fixed - "duplicate key error" when lastvisit table is not empty and on using Ghost Tracker init function
+
+-- 2.12.4 : Adding a password field control for SendMail2User - Neighborhood plugin compatibility improvement 
+            Bug 1229 fixed - Email was no longer mandatory when plugin was active, even if Piwigo's email madatory option was set. 
 */
 
@@ -200,5 +209,6 @@
   if ((isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
   {
-    SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true);
+    $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
+    SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);
   }
 }
@@ -268,8 +278,15 @@
   }
 
+  /* Email mandatory - Needed to be add here to avoid jump of standard Piwigo email control */
+  if (empty($_POST['mail_address']) and $conf['obligatory_user_mail_address'])
+  {
+    //$_POST['mail_address'] = '';
+    return l10n('reg_err_mail_address');
+  }
+
   /* Email without forbidden domains */
   if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and !ValidateEmailProvider($_POST['mail_address']))
   {
-    $_POST['login'] = '';
+    //$_POST['mail_address'] = '';
     return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'");
   }
