Index: extensions/Register_FluxBB/trunk/admin/admin.php
===================================================================
--- extensions/Register_FluxBB/trunk/admin/admin.php	(revision 6882)
+++ extensions/Register_FluxBB/trunk/admin/admin.php	(revision 6898)
@@ -7,6 +7,6 @@
 if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
 
-//ini_set('error_reporting', E_ALL);
-//ini_set('display_errors', true);
+ini_set('error_reporting', E_ALL);
+ini_set('display_errors', true);
 
 include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
@@ -574,7 +574,67 @@
   if (isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']))
   {
-    $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
-
-    $query = '
+
+/* Configuration controls */
+// Piwigo's admin username control
+    $query1 = "
+SELECT username, id
+FROM ".USERS_TABLE."
+WHERE id = ".$conf['webmaster_id']."
+;";
+
+    $pwgadmin = pwg_db_fetch_assoc(pwg_query($query1));
+
+// FluxBB's admin username control
+    $query2 = "
+SELECT username, id
+FROM ".FluxBB_USERS_TABLE."
+WHERE id = 2
+;";
+
+    $fbbadmin = pwg_db_fetch_assoc(pwg_query($query2));
+
+// FluxBB's Guest username control
+    $query3 = "
+SELECT username, id
+FROM ".FluxBB_USERS_TABLE."
+WHERE id = 1
+;";
+
+    $fbbguest = pwg_db_fetch_assoc(pwg_query($query3));
+
+// Compute configuration errors
+    if (stripslashes($pwgadmin['username']) != stripslashes($_POST['FluxBB_admin']))
+    {
+      array_push($page['errors'], l10n('error_config_admin1'));
+    }
+    if (stripslashes($pwgadmin['username']) != stripslashes($fbbadmin['username']))
+    {
+      array_push($page['errors'], l10n('error_config_admin2'));
+    }
+    if (stripslashes($fbbguest['username']) != stripslashes($_POST['FluxBB_guest']))
+    {
+      array_push($page['errors'], l10n('error_config_guest'));
+    }
+    elseif (count($page['errors']) == 0)
+    {
+      if (!function_exists('FindAvailableConfirmMailID'))
+      {
+      $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
+      }
+      elseif (function_exists('FindAvailableConfirmMailID'))
+      {
+        $conf_UAM = unserialize($conf['UserAdvManager']);
+        
+        if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and isset($conf_UAM[2]) and $conf_UAM[2] != '-1')
+        {
+          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
+        }
+        else
+        {
+          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
+        }
+      }
+
+      $query = '
 UPDATE '.CONFIG_TABLE.'
 SET value="'.$conf['Register_FluxBB'].'"
@@ -583,7 +643,8 @@
 ;';
 
-    pwg_query($query);
-
-    array_push($page['infos'], l10n('save_config'));
+      pwg_query($query);
+      
+      array_push($page['infos'], l10n('save_config'));
+    }
   }
 
@@ -617,16 +678,16 @@
       $UAM_bridge = true;
     }
-  }
-  
-  $template->assign(
-    array
-    (
-      'UAM_BRIDGE'            => $UAM_bridge,
-      'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
-      'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
-      'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
-    )
-  );
-
+  
+    $template->assign(
+      array
+      (
+        'UAM_BRIDGE'            => $UAM_bridge,
+        'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
+        'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
+        'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
+      )
+    );
+  }
+    
   $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/manage.tpl');
   $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
@@ -635,4 +696,6 @@
 
 	case 'Migration':
+  
+  $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array();
 	
   if ( isset($_POST['Migration']) and !is_adviser() )
@@ -654,5 +717,5 @@
 
     $result = pwg_query($query);
-  
+       
     while ($row = pwg_db_fetch_assoc($result))
     {
Index: extensions/Register_FluxBB/trunk/admin/template/manage.tpl
===================================================================
--- extensions/Register_FluxBB/trunk/admin/template/manage.tpl	(revision 6882)
+++ extensions/Register_FluxBB/trunk/admin/template/manage.tpl	(revision 6898)
@@ -47,5 +47,4 @@
     	<li><label>{'Admin'|@translate}</label><br>
     		<input type="text" name="FluxBB_admin" value={$FluxBB_ADMIN} size="20" style="text-align: center;"><br>
-    		{'User'|@translate}
       <br>
     	</li>
Index: extensions/Register_FluxBB/trunk/language/de_DE/plugin.lang.php
===================================================================
--- extensions/Register_FluxBB/trunk/language/de_DE/plugin.lang.php	(revision 6882)
+++ extensions/Register_FluxBB/trunk/language/de_DE/plugin.lang.php	(revision 6898)
@@ -19,8 +19,6 @@
   Überprüfen Sie die Einstellungen ihrer FluxBB Installation und korrigieren Sie sie gegebenenfalls. <br>
   Passen Sie das Verhalten des Plugins nach Ihren Wünschen an.';
-$lang['FluxBB_Prefix'] = 'FluxBB Tabellenpräfix :';
-$lang['FluxBB_Admin'] = 'Benutzername des Piwigo-administrators.';
+$lang['Prefix'] = 'FluxBB Tabellenpräfix :';
 $lang['Guest'] = 'Benutzername des FluxBB Gast-benutzers.';
-$lang['User'] = '<div class="warning">Das Administratorkonto von FluxBB muss das selbe sein</div>';
 $lang['Details'] = 'Detailgrad der generierten Reports.';
 $lang['Details_true'] = ' --&gt; Alle Ergebnisdetails anzeigen.';
@@ -157,3 +155,10 @@
 Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.';
 // --------- End: New or revised $lang ---- from version 2.3.0
+
+// --------- Starting below: New or revised $lang ---- from version 2.3.3
+/*TODO*/$lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>';
+/*TODO*/$lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!';
+/*TODO*/$lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.';
+/*TODO*/$lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!';
+// --------- End: New or revised $lang ---- from version 2.3.3
 ?>
Index: extensions/Register_FluxBB/trunk/language/en_UK/plugin.lang.php
===================================================================
--- extensions/Register_FluxBB/trunk/language/en_UK/plugin.lang.php	(revision 6882)
+++ extensions/Register_FluxBB/trunk/language/en_UK/plugin.lang.php	(revision 6898)
@@ -19,8 +19,6 @@
   Check the settings of your FluxBB installation and correct them if necessary. <br>
   Change, if any, the behavior of the plugin at your convenience.';
-$lang['FluxBB_Prefix'] = 'FluxBB Prefix tables :';
-$lang['FluxBB_Admin'] = 'Username of the Piwigo administrator.';
+$lang['Prefix'] = 'FluxBB Prefix tables :';
 $lang['Guest'] = 'Username of the FluxBB Guest user.';
-$lang['User'] = '<div class="warning">FluxBB\'s administrator name must be the same</div>';
 $lang['Details'] = 'Level of detail in reports of operations.';
 $lang['Details_true'] = ' --&gt; View all details of the results of operations.';
@@ -157,3 +155,10 @@
 Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.';
 // --------- End: New or revised $lang ---- from version 2.3.0
+
+// --------- Starting below: New or revised $lang ---- from version 2.3.3
+$lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>';
+$lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!';
+$lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.';
+$lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!';
+// --------- End: New or revised $lang ---- from version 2.3.3
 ?>
Index: extensions/Register_FluxBB/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/Register_FluxBB/trunk/language/fr_FR/plugin.lang.php	(revision 6882)
+++ extensions/Register_FluxBB/trunk/language/fr_FR/plugin.lang.php	(revision 6898)
@@ -20,7 +20,5 @@
   Modifiez, le cas échéant, le comportement du plugin à votre convenance.';
 $lang['Prefix'] = 'Préfixe des tables de FluxBB :';
-$lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo.';
 $lang['Guest'] = 'Nom d\'utilisateur de l\'invité de FluxBB.';
-$lang['User'] = '<div class="warning">Le nom de l\'administrateur de FluxBB doit être identique</div>';
 $lang['Details'] = 'Niveau de détails dans les rapports d\'opérations.';
 $lang['Details_true'] = ' --&gt; Afficher tous les détails des résultats sur les opérations.';
@@ -158,3 +156,10 @@
 De même, si vous n\'avez jamais utilisé Register_FluxBB, la phase de migration des comptes de votre galerie Piwigo vers votre forum FluxBB ne tiendra pas compte de l\'état validé ou non de vos inscrits au moment du lancement de la phase de migration.';
 // --------- End: New or revised $lang ---- from version 2.3.0
+
+// --------- Starting below: New or revised $lang ---- from version 2.3.3
+$lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo. <b style="color: red">Le nom de l\'administrateur de FluxBB doit être identique !</b>';
+$lang['error_config_admin1'] = 'ERREUR : Le nom du compte administrateur de Piwigo est incorrect !';
+$lang['error_config_admin2'] = 'ERREUR : Le nom du compte administrateur de FluxBB est différent de celui de Piwigo ! Vérifiez la configuration de votre forum FluxBB et nommez le compte administrateur de la même manière que celui de Piwigo.';
+$lang['error_config_guest'] = 'ERREUR : Le nom du compte visiteur (guest) de FluxBB est incorrect !';
+// --------- End: New or revised $lang ---- from version 2.3.3
 ?>
Index: extensions/Register_FluxBB/trunk/main.inc.php
===================================================================
--- extensions/Register_FluxBB/trunk/main.inc.php	(revision 6882)
+++ extensions/Register_FluxBB/trunk/main.inc.php	(revision 6898)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Register FluxBB
-Version: 2.3.2
+Version: 2.3.3
 Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion) - Original Nicco's NBC_LinkUser2PunBB plugin upgraded to Piwigo / Liez l'inscription des utilisateurs de Piwigo avec votre forum FluxBB - Portage du plugin NBC_LinkUser2PunBB de Nicco vers Piwigo
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=252
@@ -59,5 +59,9 @@
 2.3.1     - 31/08/10  - Bug 1825 fixed : Password corruption after Piwigo's profile page visit
 
-2.3.2     - 11/09/10  - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation 
+2.3.2     - 11/09/10  - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation
+
+2.3.3     - 13/09/10  - Bug 1853 fixed : Add of controls on plugin configuration settings to avoid some mistakes
+                      - Bug 1855 fixed : Improvement of use of UAM bridge (fixes php notices)
+                      - Several language files fix
 --------------------------------------------------------------------------------
 */
