Index: extensions/Register_FluxBB/admin/admin.php
===================================================================
--- extensions/Register_FluxBB/admin/admin.php	(revision 22095)
+++ extensions/Register_FluxBB/admin/admin.php	(revision 22204)
@@ -142,6 +142,4 @@
 if ( isset($_POST['Synchro']))
 {
-  $page_Register_FluxBB_admin = get_admin_plugin_menu_link(__FILE__);
-  
   $msg_error_PWG_Dup = '';
   $msg_error_FluxBB_Dup = '';
@@ -199,5 +197,5 @@
       $msg_error_FluxBB_Dup .= ' <a href="';
 
-      $msg_error_FluxBB_Dup .= add_url_params($page_Register_FluxBB_admin, array(
+      $msg_error_FluxBB_Dup .= add_url_params(REGFLUXBB_ADMIN, array(
         'action' => 'del_user',
         'id' => $subrow['id'],
@@ -428,5 +426,5 @@
       $msg_error_FluxBB2PWG .= '<br>'.l10n('Error_FluxBB2PWG').stripslashes($row['username']).' ('.$row['email'].')';
       $msg_error_FluxBB2PWG .= ' <a href="';
-      $msg_error_FluxBB2PWG .= add_url_params($page_Register_FluxBB_admin, array(
+      $msg_error_FluxBB2PWG .= add_url_params(REGFLUXBB_ADMIN, array(
           'action' => 'del_user',
           'id' => $row['id'],
@@ -481,6 +479,4 @@
 {
   global $page, $conf, $errors;
-
-  $page_Register_FluxBB_admin = get_admin_plugin_menu_link(__FILE__);
 
   $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']);
@@ -509,9 +505,10 @@
     $msg_error_PWG_Dup .= '<br>'.l10n('Error_PWG_Dup').$row['nbr_dup'].' x '.stripslashes($row['username']);
 
+  // Display OK message or build errors
   if ($msg_error_PWG_Dup == '')
     array_push($page['infos'], l10n('Audit_PWG_Dup').'<br>'.l10n('Audit_OK'));
   else
     $msg_error_PWG_Dup = l10n('Audit_PWG_Dup').$msg_error_PWG_Dup.'<br>'.l10n('Advise_PWG_Dup');
-  
+
 
 // Check duplicate accounts in FluxBB users table
@@ -539,20 +536,18 @@
     {
       $msg_error_FluxBB_Dup .= '<br>id:'.$subrow['id'].'='.stripslashes($subrow['username']).' ('.$subrow['email'].')';
-  
+
+      // Action : Delete duplicate user from FluxBB
       $msg_error_FluxBB_Dup .= ' <a href="';
-      
-      $msg_error_FluxBB_Dup .= add_url_params($page_Register_FluxBB_admin, array(
+      $msg_error_FluxBB_Dup .= add_url_params(REGFLUXBB_ADMIN, array(
         'action' => 'del_user',
         'id' => $subrow['id'],
       ));
-        
       $msg_error_FluxBB_Dup .= '" title="'.l10n('Del_User').stripslashes($subrow['username']).'"';
-        
       $msg_error_FluxBB_Dup .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-        
       $msg_error_FluxBB_Dup .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_delete.png" alt="'.l10n('Del_User').$subrow['username'].'" /></a>';
     }
   }
 
+  // Display OK message or build errors
   if ($msg_error_FluxBB_Dup == '')
     array_push($page['infos'], l10n('Audit_FluxBB_Dup').'<br>'.l10n('Audit_OK'));
@@ -587,19 +582,17 @@
     $msg_error_Link_Break .= '<br>'.l10n('Error_Link_Break').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')';
 
+    // Action : Create new link
     $msg_error_Link_Break .= ' <a href="';
-
-    $msg_error_Link_Break .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_Link_Break .= add_url_params(REGFLUXBB_ADMIN, array(
       'action'   => 'new_link',
       'pwg_id' => $row['pwg_id'],
       'bb_id' => $row['bb_id'],
     ));
-
     $msg_error_Link_Break .= '" title="'.l10n('New_Link').stripslashes($row['pwg_user']).'"';
-
     $msg_error_Link_Break .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_Link_Break .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/link_break.png" alt="'.l10n('New_Link').stripslashes($row['pwg_user']).'" /></a>';
   }
 
+  // Display OK message or build errors
   if ($msg_error_Link_Break == '')
     array_push($page['infos'], l10n('Audit_Link_Break').'<br>'.l10n('Audit_OK'));
@@ -625,29 +618,23 @@
     $msg_error_Link_Bad .= '<br>'.l10n('Error_Link_Del').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'.' -- '.stripslashes($row['bb_user']).' ('.$row['bb_mail'].')';
 
+    // Action : Delete obsolete links
     $msg_error_Link_Bad .= ' <a href="';
-  
-    $msg_error_Link_Bad .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_Link_Bad .= add_url_params(REGFLUXBB_ADMIN, array(
       'action'   => 'link_del',
       'pwg_id' => $row['pwg_id'],
       'bb_id'  => $row['bb_id'],
     ));
-
     $msg_error_Link_Bad .= '" title="'.l10n('Link_Del').stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).'"';
-
     $msg_error_Link_Bad .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_Link_Bad .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/link_delete.png" alt="'.l10n('Link_Del').stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).'" /></a>';
 
+    // Action : Synch users data
     $msg_error_Link_Bad .= ' -- <a href="';
-
-    $msg_error_Link_Bad .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_Link_Bad .= add_url_params(REGFLUXBB_ADMIN, array(
       'action' => 'sync_user',
       'username' => stripslashes($row['pwg_user']),
     ));
-
     $msg_error_Link_Bad .= '" title="'.l10n('Sync_User').stripslashes($row['pwg_user']).' --> '.stripslashes($row['bb_user']).'"';
-
     $msg_error_Link_Bad .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_Link_Bad .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/arrow_switch.png" alt="'.l10n('Sync_User').stripslashes($row['pwg_user']).' --> '.stripslashes($row['bb_user']).'" /></a>';
   }
@@ -675,14 +662,11 @@
     $msg_error_Link_Bad .= '<br>'.l10n('Error_Link_Dead').$Compteur['nbr_dead'];
 
+    // Action : Repair dead links
     $msg_error_Link_Bad .= ' <a href="';
-
-    $msg_error_Link_Bad .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_Link_Bad .= add_url_params(REGFLUXBB_ADMIN, array(
       'action'   => 'link_dead',
     ));
-
     $msg_error_Link_Bad .= '" title="'.l10n('Link_Dead').$Compteur['nbr_dead'].'"';
-
     $msg_error_Link_Bad .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_Link_Bad .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/link_delete.png" alt="'.l10n('Link_Dead').$Compteur['nbr_dead'].'" /></a>';
   }
@@ -707,19 +691,17 @@
     $msg_error_Link_Bad .= '<br>'.l10n('Error_Link_Dup').$row['nbr_dup'].' = '.stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).')';
 
+    // Action : Repair links
     $msg_error_Link_Bad .= ' <a href="';
-
-    $msg_error_Link_Bad .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_Link_Bad .= add_url_params(REGFLUXBB_ADMIN, array(
       'action'   => 'new_link',
       'pwg_id' => $row['pwg_id'],
       'bb_id' => $row['bb_id'],
     ));
-
     $msg_error_Link_Bad .= '" title="'.l10n('Link_Dup').stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).'"';
-
     $msg_error_Link_Bad .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_Link_Bad .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/link_error.png" alt="'.l10n('Link_Dup').stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).'" /></a>';
   }
 
+  // Display OK message or build errors
   if ($msg_error_Link_Bad == '')
     array_push($page['infos'], l10n('Audit_Link_Bad').'<br>'.l10n('Audit_OK'));
@@ -746,19 +728,16 @@
     if (($row['pwg_eml'] != $row['bb_eml']) or Reg_FluxBB_PwdSynch($row['pwg_id']))
     {
-      if ($row['pwg_eml'] != $row['bb_eml'] and Reg_FluxBB_PwdSynch($row['pwg_id']))
+      if ($row['pwg_eml'] != $row['bb_eml'] and Reg_FluxBB_PwdSynch($row['pwg_id'])) // If passwords are synch
       {
         $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']);
 
+        // Action : Synch users data from Piwigo to FluxBB
         $msg_error_Synchro .= ' <a href="';
-
-        $msg_error_Synchro .= add_url_params($page_Register_FluxBB_admin, array(
+        $msg_error_Synchro .= add_url_params(REGFLUXBB_ADMIN, array(
           'action' => 'sync_user',
           'username' => stripslashes($row['username']),
         ));
-
         $msg_error_Synchro .= '" title="'.l10n('Sync_User').stripslashes($row['username']).'"';
-
         $msg_error_Synchro .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
         $msg_error_Synchro .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_refresh.png" alt="'.l10n('Sync_User').stripslashes($row['username']).'" /></a>';
 
@@ -767,19 +746,16 @@
         $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Pswd');
       }
-      elseif ($row['pwg_eml'] != $row['bb_eml'] and !Reg_FluxBB_PwdSynch($row['pwg_id']))
+      elseif ($row['pwg_eml'] != $row['bb_eml'] and !Reg_FluxBB_PwdSynch($row['pwg_id'])) // If passwords are NOT synch
       {
         $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']);
 
+        // Action : Synch users data from Piwigo to FluxBB
         $msg_error_Synchro .= ' <a href="';
-
-        $msg_error_Synchro .= add_url_params($page_Register_FluxBB_admin, array(
+        $msg_error_Synchro .= add_url_params(REGFLUXBB_ADMIN, array(
           'action' => 'sync_user',
           'username' => stripslashes($row['username']),
         ));
-
         $msg_error_Synchro .= '" title="'.l10n('Sync_User').stripslashes($row['username']).'"';
-
         $msg_error_Synchro .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
         $msg_error_Synchro .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_refresh.png" alt="'.l10n('Sync_User').stripslashes($row['username']).'" /></a>';
 
@@ -789,5 +765,4 @@
       {
         $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']);
-
         $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Pswd');
       }
@@ -797,4 +772,5 @@
   }
 
+  // Display OK message or build errors
   if ($msg_error_Synchro <> '')
     $msg_error_Synchro = l10n('Audit_Synchro').$msg_error_Synchro;
@@ -807,4 +783,6 @@
 
 
+// Check Piwigo accounts not in FluxBB
+// -----------------------------------
   $query = '
 SELECT username, mail_address FROM '.USERS_TABLE.'
@@ -826,18 +804,16 @@
     $msg_error_PWG2FluxBB .= '<br>'.l10n('Error_PWG2FluxBB').stripslashes($row['username']).' ('.$row['mail_address'].')';
 
+    // Action : Add user to FluxBB
     $msg_error_PWG2FluxBB .= ' <a href="';
-
-    $msg_error_PWG2FluxBB .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_PWG2FluxBB .= add_url_params(REGFLUXBB_ADMIN, array(
       'action' => 'add_user',
       'username' => stripslashes($row['username']),
     ));
-
     $msg_error_PWG2FluxBB .= '" title="'.l10n('Add_User').stripslashes($row['username']).'" ';
-
     $msg_error_PWG2FluxBB .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_PWG2FluxBB .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_add.png" alt="'.l10n('Add_User').stripslashes($row['username']).'" /></a>';
   }
 
+  // Display OK message or build errors
   if ($msg_error_PWG2FluxBB == '')
     array_push($page['infos'], l10n('Audit_PWG2FluxBB').'<br>'.l10n('Audit_OK'));
@@ -846,4 +822,6 @@
 
 
+// Check FluxBB accounts not in Piwigo
+// -----------------------------------
   $query = '
 SELECT id, username, email FROM '.FluxBB_USERS_TABLE.'
@@ -864,20 +842,17 @@
     $msg_error_FluxBB2PWG .= '<br>'.l10n('Error_FluxBB2PWG').stripslashes($row['username']).' ('.$row['email'].')';
 
+    // Action : Delete user from FluxBB
     $msg_error_FluxBB2PWG .= ' <a href="';
-
-    $msg_error_FluxBB2PWG .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_FluxBB2PWG .= add_url_params(REGFLUXBB_ADMIN, array(
       'action' => 'del_user',
       'id' => $row['id'],
     ));
-
     $msg_error_FluxBB2PWG .= '" title="'.l10n('Del_User').stripslashes($row['username']).'"';
-
     $msg_error_FluxBB2PWG .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' ';
-
     $msg_error_FluxBB2PWG .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_delete.png" alt="'.l10n('Del_User').stripslashes($row['username']).'" /></a>';
 
+    // Action : Add user from FluxBB to Piwigo
     $msg_error_FluxBB2PWG .= ' <a href="';
-
-    $msg_error_FluxBB2PWG .= add_url_params($page_Register_FluxBB_admin, array(
+    $msg_error_FluxBB2PWG .= add_url_params(REGFLUXBB_ADMIN, array(
       'action' => 'add2pwg',
       'id' => $row['id'],
@@ -893,4 +868,5 @@
   }
 
+  // Display OK message or build errors
   if ($msg_error_FluxBB2PWG == '')
     array_push($page['infos'], l10n('Audit_FluxBB2PWG').'<br>'.l10n('Audit_OK'));
@@ -933,4 +909,7 @@
 // |                       Audit actions process                           |
 // +-----------------------------------------------------------------------+
+
+// Action : Delete dead link
+// -------------------------
 if (isset($_GET['action']) and ($_GET['action']=='link_dead'))
 {
@@ -951,4 +930,6 @@
   Audit_PWG_FluxBB();
 }
+// Action : Delete duplicate link
+// ------------------------------
 else if (isset($_GET['action']) and ($_GET['action']=='link_del') and isset($_GET['pwg_id']) and isset($_GET['bb_id']))
 {
@@ -963,4 +944,6 @@
   Audit_PWG_FluxBB();
 }
+// Action : Rebuild link
+// ---------------------
 else if (isset($_GET['action']) and ($_GET['action']=='new_link') and isset($_GET['pwg_id']) and isset($_GET['bb_id']))
 {
@@ -969,4 +952,6 @@
   Audit_PWG_FluxBB();
 }
+// Action : Synch users data
+// -------------------------
 else if (isset($_GET['action']) and ($_GET['action']=='sync_user') and isset($_GET['username']))
 {
@@ -988,4 +973,6 @@
   Audit_PWG_FluxBB();
 }
+// Action : Add user to FluxBB
+// ---------------------------
 else if (isset($_GET['action']) and ($_GET['action']=='add_user') and isset($_GET['username']))
 {
@@ -1005,4 +992,6 @@
    Audit_PWG_FluxBB();
 }
+// Action : Delete user
+// --------------------
 else if (isset($_GET['action']) and ($_GET['action']=='del_user') and isset($_GET['id']))
 {
@@ -1011,12 +1000,103 @@
   Audit_PWG_FluxBB();
 }
+// Action : Add user to Piwigo
+// ---------------------------
 else if (isset($_GET['action']) and ($_GET['action']=='add2pwg') and isset($_GET['id']) and isset($_GET['username']) and isset($_GET['email']))
 {
-  $error = Synch_Piwigo_Adduser($_GET['id'], $_GET['username'], $_GET['email']);
-  
-  if (!$error)
-    Audit_PWG_FluxBB();
+  $emails_to_create = array();
+  $emails_rejected = array();
+  $emails_already_exist = array();
+  $emails_created = array();
+  $emails_on_error = array();
+  
+  $email = trim($_GET['email']);
+  $username = $_GET['username'];
+  $fluxbb_id = $_GET['id'];
+
+  // this test requires PHP 5.2+
+  if (filter_var($email, FILTER_VALIDATE_EMAIL) !== false)
+  {
+    $emails_to_check[] = $email;
+
+    if (!get_userid_by_email($email))
+    {
+      $emails_to_create[] = $email;
+    }
+    else
+    {
+      $emails_existing[] = $email;
+    }
+  }
+  elseif (!empty($email))
+  {
+    $emails_rejected[] = $email;
+  }
+
+  // find a password
+  $password = generate_key(8);
+
+  $Piwigo_Adduser_Errors = Synch_Piwigo_Adduser($fluxbb_id, $username, $password, $email);
+
+  if (!empty($Piwigo_Adduser_Errors))
+  {
+    $emails_on_error[] = $email;
+  }
   else
-    $template->append('errors', l10n('RegFluxBB_Email_or_Username_already_exist'));
+  {
+    $emails_created[] = $email;
+  }
+
+  $emails_for_form = array();
+
+  if (!empty($emails_created))
+  {
+    array_push(
+      $page['infos'],
+      sprintf(
+        l10n('%d users registered'),
+        count($emails_created)
+        )
+      );
+  }
+
+  if (!empty($emails_on_error))
+  {
+    array_push(
+      $page['errors'],
+      sprintf(
+        l10n('%d registrations on error: %s'),
+        count($emails_on_error),
+        implode(', ', $emails_on_error)
+        )
+      );
+
+    $emails_for_form = array_merge($emails_for_form, $emails_on_error);
+  }
+
+  if (!empty($emails_rejected))
+  {
+    array_push(
+      $page['errors'],
+      sprintf(
+        l10n('%d email addresses rejected: %s'),
+        count($emails_rejected),
+        implode(', ', $emails_rejected)
+        )
+      );
+
+    $emails_for_form = array_merge($emails_for_form, $emails_rejected);
+  }
+
+  if (!empty($emails_existing))
+  {
+    array_push(
+      $page['warnings'],
+      sprintf(
+        l10n('%d email addresses already exist: %s'),
+        count($emails_existing),
+        implode(', ', $emails_existing)
+        )
+      );
+  }
 }
 
Index: extensions/Register_FluxBB/changelog.txt.php
===================================================================
--- extensions/Register_FluxBB/changelog.txt.php	(revision 22095)
+++ extensions/Register_FluxBB/changelog.txt.php	(revision 22204)
@@ -130,4 +130,7 @@
 2.5.8 - Add accounts synchronization from FluxBB to Piwigo
       - Bug fixed : Missing function in audit
+
+2.5.9 - Bug fixed : Adding accounts from FluxBB to Piwigo was not working
+        // TODO: Compatibility with user_mass_register
 */
 ?>
Index: extensions/Register_FluxBB/include/functions.inc.php
===================================================================
--- extensions/Register_FluxBB/include/functions.inc.php	(revision 22095)
+++ extensions/Register_FluxBB/include/functions.inc.php	(revision 22204)
@@ -3,15 +3,4 @@
 include_once (PHPWG_ROOT_PATH.'/include/constants.php');
 include_once (REGFLUXBB_PATH.'include/constants.php');
-
-
-function Register_FluxBB_admin_menu($menu)
-{
-  array_push($menu, array(
-    'NAME' => 'Register FluxBB',
-    'URL' => get_root_url().'admin.php?page=plugin-'.basename(REGFLUXBB_PATH)
-    )
-  );
-  return $menu;
-}
 
 
@@ -65,15 +54,20 @@
 
 /**
- * Checks special users exclusion befaore add new registered user in FluxBB user table
+ * Checks special users exclusion before add new registered user in FluxBB user table
  */
 function Register_FluxBB_Adduser($register_user)
 {
   global $errors, $conf;
-	
-  // Exclusion of Adult_Content users
-  if ($register_user['username'] != "16" and $register_user['username'] != "18")
+
+  // Exclusion of Adult_Content users - //Todo: Compatibility with user_mass_register plugin
+  if ($register_user['username'] != "16" and $register_user['username'] != "18" /*and strpos(@$_GET['page'],'user_mass_register') === false*/)
   {
     FluxBB_Adduser($register_user['id'], $register_user['username'], sha1($_POST['password']), $register_user['email']);
   }
+  /*elseif ($register_user['username'] != "16" and $register_user['username'] != "18" and strpos(@$_GET['page'],'user_mass_register') !== false)
+  {
+    //include_once(PHPWG_ROOT_PATH.'plugins/user_mass_register/admin.php');
+    //FluxBB_Adduser($register_user['id'],$login, $password, $email);
+  }*/
 }
 
@@ -643,30 +637,27 @@
  * To solve password synch problem, passwords are reset to NULL to force users to get a new password on their profile page
  * 
- * @return : $error
- */
-function Synch_Piwigo_Adduser($fluxbb_id, $username, $email)
+ * Based on user_mass_register plugin (thx to plg!)
+ * 
+ * @return : $errors
+ */
+function Synch_Piwigo_Adduser($fluxbb_id, $username, $password, $email)
 {
   global $conf;
   load_language('plugin.lang', REGFLUXBB_PATH);
 
-  if (!get_userid_by_email($email) and !get_userid($username))
-  {
-    // find a password
-    $password = generate_key(8);
-
-    $error = register_user($username, $password, $email, false);
-
-    if (empty($error))
+    $errors = register_user($username, $password, $email, false);
+
+    if (empty($errors))
     {
       include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
 
       $keyargs_content = array(
-        get_l10n_args('Hello %s,', $login),
+        get_l10n_args('Hello %s,', $username),
         get_l10n_args('To synchronize your forum access with the gallery you have been registered at %s!', $conf['gallery_title']),
         get_l10n_args('', ''),
         get_l10n_args('Here are your connection settings', ''),
-        get_l10n_args('Username: %s', $login),
+        get_l10n_args('Username: %s', $username),
         get_l10n_args('Password: %s', $password),
-        get_l10n_args('Email: %s', $mail_address),
+        get_l10n_args('Email: %s', $email),
         get_l10n_args('', ''),
         get_l10n_args('Please change your password at your first connexion on the gallery', ''),
@@ -676,5 +667,5 @@
 
       pwg_mail(
-        $mail_address,
+        $email,
         array(
           'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
@@ -687,11 +678,7 @@
 
       FluxBB_Linkuser($pwg_id, $fluxbb_id, "NOK");
-      
-      $error = false;
     }
-  }
-  else $error = true;
-
-  return $error;
+
+  return $errors;
 }
 
Index: extensions/Register_FluxBB/main.inc.php
===================================================================
--- extensions/Register_FluxBB/main.inc.php	(revision 22095)
+++ extensions/Register_FluxBB/main.inc.php	(revision 22204)
@@ -11,5 +11,11 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+// +-----------------------------------------------------------------------+
+// | Define plugin constants                                               |
+// +-----------------------------------------------------------------------+
+
+defined('REGFLUXBB_ID') or define('REGFLUXBB_ID', basename(dirname(__FILE__)));
+define('REGFLUXBB_PATH' ,   PHPWG_PLUGINS_PATH . REGFLUXBB_ID . '/');
+define('REGFLUXBB_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . REGFLUXBB_ID);
 
 include_once (REGFLUXBB_PATH.'include/constants.php');
@@ -18,14 +24,36 @@
 load_language('plugin.lang', REGFLUXBB_PATH);
 
-/* plugin administration */
+// admin plugins menu link
 add_event_handler('get_admin_plugin_menu_links', 'Register_FluxBB_admin_menu');
 
+/**
+ * admin plugins menu link
+ */
+function Register_FluxBB_admin_menu($menu) 
+{
+  array_push(
+    $menu,
+    array(
+      'NAME' => 'Register FluxBB',
+      'URL' => REGFLUXBB_ADMIN,
+      )
+    );
 
-/* user creation*/
-add_event_handler('register_user', 'Register_FluxBB_Adduser');
+  return $menu;
+}
+
+
+/* user creation */
+if (strpos(@$_GET['page'],'Register_FluxBB') === false) // Exclude user creation from plugin panel to make FluxBB2Piwigo synch available
+{
+  add_event_handler('register_user', 'Register_FluxBB_Adduser', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+}
 
 
 // Check users registration
-add_event_handler('register_user_check', 'Register_FluxBB_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+if (strpos(@$_GET['page'],'Register_FluxBB') === false) // Exclude user creation from plugin panel to make FluxBB2Piwigo synch available
+{
+  add_event_handler('register_user_check', 'Register_FluxBB_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+}
 
 
