Changeset 22091


Ignore:
Timestamp:
04/09/13 18:17:32 (6 years ago)
Author:
Eric
Message:

Rebuild version 2.5.6 due to last commit corruption

Location:
extensions/Register_FluxBB
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/admin/admin.php

    r22039 r22091  
    137137 
    138138 
    139 // +------------------------------------------------------------+ 
    140 // |                    Migration and Audit                     | 
    141 // +------------------------------------------------------------+ 
    142 //if (isset($_POST['Migration'])) 
    143 //{ 
    144 //  array_push($page['infos'], l10n('Mig_Start').'<br><br>'); 
    145 // 
    146 //  array_push($page['infos'], l10n('Mig_Del_Link').'<br><br>'); 
    147 // 
    148 //  $query = 'TRUNCATE '.Register_FluxBB_ID_TABLE.';'; 
    149 //  $result = pwg_query($query); 
    150 // 
    151 //  $msg_Mig_Del_AllUsers = ''; 
    152 // 
    153 //  $query = ' 
    154 //SELECT username, id 
    155 //FROM '.FluxBB_USERS_TABLE.' 
    156 //;'; 
    157 // 
    158 //  $result = pwg_query($query); 
    159 // 
    160 //  while ($row = pwg_db_fetch_assoc($result)) 
    161 //  { 
    162 //    if((stripslashes($row['username']) != stripslashes($conf_Register_FluxBB['FLUXBB_GUEST'])) and (stripslashes($row['username']) != stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']))) 
    163 //    { 
    164 //      $msg_Mig_Del_AllUsers .= '<br> - '.l10n('Mig_Del_User').stripslashes($row['username']); 
    165 // 
    166 //      FluxBB_Deluser($row['id'], false); 
    167 //    } 
    168 //  } 
    169 // 
    170 //  array_push($page['infos'], l10n('Mig_Del_AllUsers').$msg_Mig_Del_AllUsers.'<br><br>'); 
    171 // 
    172 //  $query = ' 
    173 //SELECT id, username, password, mail_address 
    174 //FROM '.USERS_TABLE.' 
    175 //WHERE username NOT IN ("18","16") 
    176 //;'; 
    177 // 
    178 //  $result = pwg_query($query); 
    179 // 
    180 //  $registred = time(); 
    181 //  $registred_ip = $_SERVER['REMOTE_ADDR']; 
    182 // 
    183 //  $msg_Mig_Add_AllUsers = ''; 
    184 // 
    185 //  while ($row = pwg_db_fetch_assoc($result)) 
    186 //  { 
    187 //    if((stripslashes($row['username']) != 'guest') and (stripslashes($row['username']) != stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']))) 
    188 //    { 
    189 //      $msg_Mig_Add_AllUsers .= '<br> - '.l10n('Mig_Add_User').stripslashes($row['username']); 
    190 // 
    191 //      FluxBB_Adduser($row['id'], stripslashes($row['username']), $row['password'], $row['mail_address']); 
    192 //    } 
    193 //  } 
    194 // 
    195 //  array_push($page['infos'], l10n('Mig_Add_AllUsers').$msg_Mig_Add_AllUsers.'<br><br>'); 
    196 // 
    197 //  $query = ' 
    198 //SELECT id, username, password, mail_address 
    199 //FROM '.USERS_TABLE.' 
    200 //WHERE username = "'.$conf_Register_FluxBB['FLUXBB_ADMIN'].'" 
    201 //AND username NOT IN ("18","16") 
    202 //;'; 
    203 // 
    204 //  $row = pwg_db_fetch_assoc(pwg_query($query)); 
    205 // 
    206 //  if (!empty($row)) 
    207 //  { 
    208 //    array_push($page['infos'], l10n('Sync_User').stripslashes($row['username']).'<br><br>'); 
    209 // 
    210 //    FluxBB_Updateuser($row['id'], stripslashes($row['username']), $row['password'], $row['mail_address']); 
    211 //  } 
    212 // 
    213 //  array_push($page['infos'], l10n('Mig_End')); 
    214 //} 
    215 //else if (isset($_POST['Audit'])) 
    216 //{ 
    217 //  Audit_PWG_FluxBB(); 
    218 //} 
    219  
    220  
    221139// +--------------------------------------------------------+ 
    222140// |                    Synch and Audit                     | 
     
    240158FROM '.USERS_TABLE.' 
    241159WHERE username NOT IN ("18","16") 
     160AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    242161GROUP BY BINARY username 
    243162HAVING COUNT(*) > 1 
     
    269188FROM '.FluxBB_USERS_TABLE.'  
    270189WHERE BINARY username = BINARY "'.$row['username'].'" 
     190AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    271191;'; 
    272192 
     
    310230AND pwg.username = bb.username 
    311231AND pwg.username NOT IN ("18","16") 
     232AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    312233AND pwg.mail_address = bb.email 
    313234;'; 
     
    318239    { 
    319240      $msg_error_Link_Break .= '<br>'.l10n('New_Link').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'; 
    320       FluxBB_Linkuser($row['pwg_id'], $row['bb_id']); 
     241      FluxBB_Linkuser($row['pwg_id'], $row['bb_id'], "NOK"); 
    321242    } 
    322243 
     
    333254WHERE BINARY pwg.username <> BINARY bb.username 
    334255AND pwg.username NOT IN ("18","16") 
     256AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    335257;'; 
    336258 
     
    390312INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
    391313WHERE pwg.username NOT IN ("18","16") 
     314AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    392315GROUP BY link.id_user_pwg, link.id_user_FluxBB 
    393316HAVING COUNT(*) > 1 
     
    400323      $msg_error_Link_Bad .= '<br>'.l10n('Link_Dup').$row['nbr_dup'].' = '.stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).')'; 
    401324   
    402       FluxBB_Linkuser($row['pwg_id'], $row['bb_id']); 
     325      FluxBB_Linkuser($row['pwg_id'], $row['bb_id'], "NOK"); 
    403326    } 
    404327 
     
    408331      $msg_error_Link_Bad = l10n('Sync_Link_Bad').$msg_error_Link_Bad; 
    409332 
    410 //    $query = ' 
    411 //SELECT pwg.id as pwg_id, pwg.username as username, pwg.password as pwg_pwd, pwg.mail_address as pwg_eml, FluxBB.id as bb_id, FluxBB.password as bb_pwd, FluxBB.email as bb_eml 
    412 //FROM '.FluxBB_USERS_TABLE.' AS FluxBB  
    413 //INNER JOIN '.Register_FluxBB_ID_TABLE.' AS link ON link.id_user_FluxBB = FluxBB.id 
    414 //INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
    415 //AND BINARY pwg.username = BINARY FluxBB.username 
    416 //ORDER BY LOWER(pwg.username) 
    417 //;'; 
    418 // 
    419 //    $result = pwg_query($query); 
    420 // 
    421 //    while($row = pwg_db_fetch_assoc($result)) 
    422 //    { 
    423 //      if ( ($row['pwg_pwd'] != $row['bb_pwd']) or ($row['pwg_eml'] != $row['bb_eml']) ) 
    424 //      { 
    425 //        $msg_error_Synchro .= '<br>'.l10n('Sync_User').stripslashes($row['username']); 
    426 // 
    427 //        $query = ' 
    428 //SELECT id, username, password, mail_address  
    429 //FROM '.USERS_TABLE.' 
    430 //WHERE BINARY id = "'.$row['pwg_id'].'" 
    431 //AND "'.$row['username'].'" NOT IN ("18","16") 
    432 //;'; 
    433 // 
    434 //        $data = pwg_db_fetch_assoc(pwg_query($query)); 
    435 // 
    436 //        if (!empty($data)) 
    437 //          FluxBB_Updateuser($data['id'], stripslashes($data['username']), $data['password'], $data['mail_address']); 
    438 //      } 
    439 //    } 
     333    $query = ' 
     334SELECT pwg.id as pwg_id, pwg.username as username, pwg.mail_address as pwg_eml, FluxBB.id as bb_id, FluxBB.email as bb_eml 
     335FROM '.FluxBB_USERS_TABLE.' AS FluxBB  
     336INNER JOIN '.Register_FluxBB_ID_TABLE.' AS link ON link.id_user_FluxBB = FluxBB.id 
     337INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
     338AND BINARY pwg.username = BINARY FluxBB.username 
     339AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
     340ORDER BY LOWER(pwg.username) 
     341;'; 
     342 
     343    $result = pwg_query($query); 
     344 
     345    while($row = pwg_db_fetch_assoc($result)) 
     346    { 
     347      if ($row['pwg_eml'] != $row['bb_eml']) 
     348      { 
     349        $msg_error_Synchro .= '<br>'.l10n('Sync_User').stripslashes($row['username']); 
     350 
     351        $query = ' 
     352SELECT id, username, mail_address  
     353FROM '.USERS_TABLE.' 
     354WHERE BINARY id = "'.$row['pwg_id'].'" 
     355AND "'.$row['username'].'" NOT IN ("18","16") 
     356AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
     357;'; 
     358 
     359        $data = pwg_db_fetch_assoc(pwg_query($query)); 
     360 
     361        if (!empty($data)) 
     362          Synch_FluxBB_Updateuser($data['id'], stripslashes($data['username']), $data['mail_address']); 
     363      } 
     364    } 
    440365 
    441366    if ($msg_error_Synchro == '') 
     
    444369      $msg_error_Synchro = l10n('Sync_DataUser').$msg_error_Synchro; 
    445370 
    446 //    $query = ' 
    447 //SELECT username, mail_address FROM '.USERS_TABLE.' 
    448 //WHERE BINARY username <> BINARY "guest" 
    449 //AND username NOT IN ("18","16") 
    450 //AND id not in ( 
    451 //  SELECT id_user_pwg FROM '.Register_FluxBB_ID_TABLE.' 
    452 //  ) 
    453 //AND BINARY username not in ( 
    454 //  SELECT username FROM '.FluxBB_USERS_TABLE.' 
    455 //  ) 
    456 //ORDER BY LOWER(username) 
    457 //;'; 
    458 // 
    459 //    $result = pwg_query($query); 
    460 // 
    461 //    while($row = pwg_db_fetch_assoc($result)) 
    462 //    { 
    463 //      $msg_error_PWG2FluxBB .= '<br>'.l10n('Add_User').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
    464 // 
    465 //      $query = ' 
    466 //SELECT id, username, password, mail_address  
    467 //FROM '.USERS_TABLE.' 
    468 //WHERE BINARY username = BINARY "'.$row['username'].'" 
    469 //AND username NOT IN ("18","16") 
    470 //LIMIT 1 
    471 //;'; 
    472 // 
    473 //      $data = pwg_db_fetch_assoc(pwg_query($query)); 
    474 // 
    475 //      if (!empty($data)) 
    476 //        FluxBB_Adduser($data['id'], stripslashes($data['username']), $data['password'], $data['mail_address']);   
    477 //    } 
     371    $query = ' 
     372SELECT username, mail_address FROM '.USERS_TABLE.' 
     373WHERE BINARY username <> BINARY "guest" 
     374AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
     375AND username NOT IN ("18","16") 
     376AND id not in ( 
     377  SELECT id_user_pwg FROM '.Register_FluxBB_ID_TABLE.' 
     378  ) 
     379AND BINARY username not in ( 
     380  SELECT username FROM '.FluxBB_USERS_TABLE.' 
     381  ) 
     382ORDER BY LOWER(username) 
     383;'; 
     384 
     385    $result = pwg_query($query); 
     386 
     387   while($row = pwg_db_fetch_assoc($result)) 
     388    { 
     389      $msg_error_PWG2FluxBB .= '<br>'.l10n('Add_User').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
     390 
     391      $query = ' 
     392SELECT id, username, mail_address  
     393FROM '.USERS_TABLE.' 
     394WHERE BINARY username = BINARY "'.$row['username'].'" 
     395AND username NOT IN ("18","16") 
     396AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
     397LIMIT 1 
     398;'; 
     399 
     400      $data = pwg_db_fetch_assoc(pwg_query($query)); 
     401 
     402      if (!empty($data)) 
     403        Synch_FluxBB_Adduser($data['id'], stripslashes($data['username']), $data['mail_address']);   
     404    } 
    478405 
    479406    if ($msg_error_PWG2FluxBB == '') 
     
    485412SELECT id, username, email FROM '.FluxBB_USERS_TABLE.' 
    486413WHERE BINARY username <> BINARY "'.$conf_Register_FluxBB['FLUXBB_GUEST'].'" 
     414AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    487415AND id not in ( 
    488416  SELECT id_user_FluxBB FROM '.Register_FluxBB_ID_TABLE.' 
     
    573501FROM '.USERS_TABLE.' 
    574502WHERE username NOT IN ("18","16") 
    575 AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    576503GROUP BY BINARY username 
    577504HAVING COUNT(*) > 1 
     
    606533FROM '.FluxBB_USERS_TABLE.'  
    607534WHERE BINARY username = BINARY "'.$row['username'].'" 
    608 AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    609535;'; 
    610536    $subresult = pwg_query($subquery); 
     
    651577  ) 
    652578AND pwg.username = bb.username 
    653 AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    654579AND pwg.username NOT IN ("18","16") 
    655580AND pwg.mail_address = bb.email 
     
    691616INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
    692617WHERE pwg.username <> bb.username 
    693 AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    694618AND pwg.username NOT IN ("18","16") 
    695619;'; 
     
    773697INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
    774698WHERE pwg.username NOT IN ("18","16") 
    775 AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    776699GROUP BY link.id_user_pwg, link.id_user_FluxBB 
    777700HAVING COUNT(*) > 1 
     
    808731// ------------------------------------------- 
    809732  $query = ' 
    810 SELECT pwg.username as username, pwg.password as pwg_pwd, pwg.mail_address as pwg_eml, FluxBB.password as bb_pwd, FluxBB.email as bb_eml 
     733SELECT pwg.id as pwg_id, pwg.username as username, pwg.mail_address as pwg_eml, FluxBB.email as bb_eml 
    811734FROM '.FluxBB_USERS_TABLE.' AS FluxBB  
    812735INNER JOIN '.Register_FluxBB_ID_TABLE.' AS link ON link.id_user_FluxBB = FluxBB.id 
    813736INNER JOIN '.USERS_TABLE.' as pwg ON link.id_user_pwg = pwg.id 
    814737WHERE BINARY pwg.username = BINARY FluxBB.username 
    815 AND pwg.username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    816738AND pwg.username NOT IN ("18","16") 
    817739ORDER BY LOWER(pwg.username) 
     
    822744  while($row = pwg_db_fetch_assoc($result)) 
    823745  { 
    824     if (($row['pwg_pwd'] != $row['bb_pwd']) or ($row['pwg_eml'] != $row['bb_eml'])) 
    825     { 
    826       $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']); 
    827  
    828       $msg_error_Synchro .= ' <a href="'; 
    829  
    830       $msg_error_Synchro .= add_url_params($page_Register_FluxBB_admin, array( 
    831         'action' => 'sync_user', 
    832         'username' => stripslashes($row['username']), 
    833       )); 
    834  
    835       $msg_error_Synchro .= '" title="'.l10n('Sync_User').stripslashes($row['username']).'"'; 
    836  
    837       $msg_error_Synchro .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' '; 
    838  
    839       $msg_error_Synchro .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_refresh.png" alt="'.l10n('Sync_User').stripslashes($row['username']).'" /></a>'; 
    840  
    841       if ($row['pwg_pwd'] != $row['bb_pwd']) 
     746    if (($row['pwg_eml'] != $row['bb_eml']) or Reg_FluxBB_PwdSynch($row['pwg_id'])) 
     747    { 
     748      if ($row['pwg_eml'] != $row['bb_eml'] and Reg_FluxBB_PwdSynch($row['pwg_id'])) 
     749      { 
     750        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']); 
     751 
     752        $msg_error_Synchro .= ' <a href="'; 
     753 
     754        $msg_error_Synchro .= add_url_params($page_Register_FluxBB_admin, array( 
     755          'action' => 'sync_user', 
     756          'username' => stripslashes($row['username']), 
     757        )); 
     758 
     759        $msg_error_Synchro .= '" title="'.l10n('Sync_User').stripslashes($row['username']).'"'; 
     760 
     761        $msg_error_Synchro .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' '; 
     762 
     763        $msg_error_Synchro .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_refresh.png" alt="'.l10n('Sync_User').stripslashes($row['username']).'" /></a>'; 
     764 
     765        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Mail').'<br>-- PWG = '.$row['pwg_eml'].'<br>-- FluxBB = '.$row['bb_eml']; 
     766 
    842767        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Pswd'); 
    843  
    844       if ($row['pwg_eml'] != $row['bb_eml']) 
     768      } 
     769      elseif ($row['pwg_eml'] != $row['bb_eml'] and !Reg_FluxBB_PwdSynch($row['pwg_id'])) 
     770      { 
     771        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']); 
     772 
     773        $msg_error_Synchro .= ' <a href="'; 
     774 
     775        $msg_error_Synchro .= add_url_params($page_Register_FluxBB_admin, array( 
     776          'action' => 'sync_user', 
     777          'username' => stripslashes($row['username']), 
     778        )); 
     779 
     780        $msg_error_Synchro .= '" title="'.l10n('Sync_User').stripslashes($row['username']).'"'; 
     781 
     782        $msg_error_Synchro .= $conf_Register_FluxBB['FLUXBB_CONFIRM']=='false' ?  ' onclick="return confirm(\''.l10n('Are you sure?').'\');" ' : ' '; 
     783 
     784        $msg_error_Synchro .= '><img src="'.REGFLUXBB_PATH.'/admin/template/icon/user_refresh.png" alt="'.l10n('Sync_User').stripslashes($row['username']).'" /></a>'; 
     785 
    845786        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Mail').'<br>-- PWG = '.$row['pwg_eml'].'<br>-- FluxBB = '.$row['bb_eml']; 
     787      } 
     788      elseif ($row['pwg_eml'] = $row['bb_eml'] and Reg_FluxBB_PwdSynch($row['pwg_id'])) 
     789      { 
     790        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro').stripslashes($row['username']); 
     791 
     792        $msg_error_Synchro .= '<br>'.l10n('Error_Synchro_Pswd'); 
     793      } 
    846794    } 
    847795    else if ($conf_Register_FluxBB['FLUXBB_DETAIL'] == 'true') 
     
    851799  if ($msg_error_Synchro <> '') 
    852800    $msg_error_Synchro = l10n('Audit_Synchro').$msg_error_Synchro; 
    853      
     801 
    854802  if ($msg_ok_Synchro <> '') 
    855803    if ($msg_error_Synchro <> '') 
     
    863811WHERE BINARY username <> BINARY "guest" 
    864812AND username NOT IN ("18","16") 
    865 AND username <> "'.stripslashes($conf_Register_FluxBB['FLUXBB_ADMIN']).'" 
    866813AND id not in ( 
    867814  SELECT id_user_pwg FROM '.Register_FluxBB_ID_TABLE.' 
     
    902849SELECT id, username, email FROM '.FluxBB_USERS_TABLE.' 
    903850WHERE BINARY username <> BINARY "'.$conf_Register_FluxBB['FLUXBB_GUEST'].'" 
    904 AND BINARY username <> BINARY "'.$conf_Register_FluxBB['FLUXBB_ADMIN'].'" 
    905851AND id not in ( 
    906852  SELECT id_user_FluxBB FROM '.Register_FluxBB_ID_TABLE.' 
     
    1004950else if (isset($_GET['action']) and ($_GET['action']=='new_link') and isset($_GET['pwg_id']) and isset($_GET['bb_id'])) 
    1005951{ 
    1006   FluxBB_Linkuser($_GET['pwg_id'], $_GET['bb_id']); 
     952  FluxBB_Linkuser($_GET['pwg_id'], $_GET['bb_id'], "NOK"); 
    1007953   
    1008954  Audit_PWG_FluxBB(); 
    1009955} 
    1010 //else if (isset($_GET['action']) and ($_GET['action']=='sync_user') and isset($_GET['username'])) 
    1011 //{ 
    1012 //  $query = ' 
    1013 //SELECT id AS id_pwg, username, password, mail_address  
    1014 //FROM '.USERS_TABLE.' 
    1015 //WHERE BINARY username = BINARY "'.pwg_db_real_escape_string($_GET['username']).'" 
    1016 //AND username NOT IN ("18","16") 
    1017 //LIMIT 1 
    1018 //;'; 
    1019 // 
    1020 //  $data = pwg_db_fetch_assoc(pwg_query($query)); 
    1021 //   
    1022 //  if (!empty($data)) 
    1023 //  { 
    1024 //    FluxBB_Updateuser($data['id_pwg'], stripslashes($data['username']), $data['password'], $data['mail_address']); 
    1025 //  } 
    1026 //   
    1027 //  Audit_PWG_FluxBB(); 
    1028 //} 
    1029 else if (isset($_GET['action']) and ($_GET['action']=='add_user') and isset($_GET['username'])) 
    1030 { 
    1031   $query = ' 
    1032 SELECT id, username, password, mail_address  
     956else if (isset($_GET['action']) and ($_GET['action']=='sync_user') and isset($_GET['username'])) 
     957{ 
     958  $query = ' 
     959SELECT id AS id_pwg, username, mail_address  
    1033960FROM '.USERS_TABLE.' 
    1034961WHERE BINARY username = BINARY "'.pwg_db_real_escape_string($_GET['username']).'" 
     
    1038965 
    1039966  $data = pwg_db_fetch_assoc(pwg_query($query)); 
    1040  
     967   
    1041968  if (!empty($data)) 
    1042     FluxBB_Adduser($data['id'], stripslashes($data['username']), $data['password'], $data['mail_address']);   
     969  { 
     970    Synch_FluxBB_Updateuser($data['id_pwg'], stripslashes($data['username']), $data['mail_address']); 
     971  } 
     972   
     973  Audit_PWG_FluxBB(); 
     974} 
     975else if (isset($_GET['action']) and ($_GET['action']=='add_user') and isset($_GET['username'])) 
     976{ 
     977  $query = ' 
     978SELECT id, username, mail_address  
     979FROM '.USERS_TABLE.' 
     980WHERE BINARY username = BINARY "'.pwg_db_real_escape_string($_GET['username']).'" 
     981AND username NOT IN ("18","16") 
     982LIMIT 1 
     983;'; 
     984 
     985  $data = pwg_db_fetch_assoc(pwg_query($query)); 
     986 
     987  if (!empty($data)) 
     988    Synch_FluxBB_Adduser($data['id'], stripslashes($data['username']), $data['mail_address']); 
    1043989 
    1044990   Audit_PWG_FluxBB(); 
     
    1046992else if (isset($_GET['action']) and ($_GET['action']=='del_user') and isset($_GET['id'])) 
    1047993{ 
    1048   FluxBB_Deluser( $_GET['id'], true ); 
     994  FluxBB_Deluser($_GET['id'], true); 
    1049995 
    1050996  Audit_PWG_FluxBB(); 
  • extensions/Register_FluxBB/admin/template/admin.tpl

    r21431 r22091  
    166166 
    167167<form method="post" action="" class="general"> 
    168 <div id="instructionMigrate" class="instructionBlock" > 
    169  
    170   <div id="migrate_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('migrate_header', 'Migrate')"> 
    171     <span class="cluetip" title="{'Mig_Title'|translate}|{'Mig_Title_d'|translate}"> 
    172       {'Mig_Title'|@translate} 
    173     </span> 
    174   </div> 
    175  
    176   <div id="Migrate" class="instructionBlockContent" style="display:none"> 
    177   <fieldset> 
    178         {'Mig_Text'|@translate} 
    179     <br/> 
    180         <p> 
    181       <input class="submit" type="submit" value="{'Audit_Btn'|@translate}" name="Audit"/>&nbsp; 
    182       <input onclick="return confirm('{'Are you sure?'|@translate}');" class="submit" type="submit" value="{'Mig_Btn'|@translate}" name="Migration" {$TAG_INPUT_ENABLED}/> 
    183       <input name="nb_para" id="nb_para" type="text" value="{$nb_para}" style="display:none"/> 
    184       <input name="nb_para2" id="nb_para2" type="text" value="{$nb_para2}" style="display:none"/> 
    185     </p> 
    186   </fieldset> 
    187   </div> 
    188 </div> 
    189 </form> 
    190  
    191  
    192 <form method="post" action="" class="general"> 
    193168<div id="instructionSynch" class="instructionBlock" > 
    194169  <div id="synch_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('synch_header', 'Synch')"> 
  • extensions/Register_FluxBB/include/functions.inc.php

    r22039 r22091  
    1515} 
    1616 
    17 /** 
    18  * Add new registered user in FluxBB user table 
    19  */ 
    20 function Register_FluxBB_Adduser($register_user) 
    21 { 
    22   global $errors, $conf; 
    23          
    24   // Exclusion of Adult_Content users 
    25   if ($register_user['username'] != "16" and $register_user['username'] != "18") 
    26   { 
    27     // Warning : FluxBB uses Sha1 hash instead of a salted md5 for Piwigo! // TODO: Reset password 
    28     FluxBB_Adduser($register_user['id'], $register_user['username'], sha1($_POST['password']), $register_user['email']); 
    29   } 
    30 } 
    31  
    32 /** 
    33  * Delete registered user in FluxBB user table 
    34  */ 
    35 function Register_FluxBB_Deluser($user_id) 
    36 { 
    37   FluxBB_Deluser(FluxBB_Searchuser($user_id), true); 
    38 } 
    3917 
    4018/** 
    4119 * Change user's password in FluxBB user table if a new password is set in Piwigo 
    42  */ 
    43 function Register_FluxBB_InitPage() 
    44 { 
    45   global $conf, $user; 
     20 * or an account synchronization was set 
     21 */ 
     22function Register_FluxBB_InitProfile() 
     23{ 
     24  global $template, $conf, $user; 
     25 
     26  if (Reg_FluxBB_PwdSynch($user['id'])) 
     27  { 
     28    $template->append('errors', l10n('RegFluxBB_Password_Reset_Msg')); 
     29  } 
    4630 
    4731  if (isset($_POST['validate'])) 
     
    5741 
    5842      list($username) = pwg_db_fetch_row(pwg_query($query)); 
    59       // Warning : FluxBB uses Sha1 hash instead of a salted md5 for Piwigo! // TODO: Reset password 
    6043      FluxBB_Updateuser($user['id'], stripslashes($username), sha1($_POST['use_new_pwd']), $_POST['mail_address']); 
    6144    } 
    6245  } 
     46} 
     47 
     48 
     49/** 
     50 * Triggered on login_success 
     51 *  
     52 * Redirect user to profile page and displays a message to make him change his password for synch with FluxBB 
     53 *  
     54 */ 
     55function Register_FluxBB_Login() 
     56{ 
     57  global $conf, $user; 
     58 
     59    if (Reg_FluxBB_PwdSynch($user['id'])) 
     60    { 
     61      redirect(PHPWG_ROOT_PATH.'profile.php'); 
     62    } 
     63} 
     64 
     65 
     66/** 
     67 * Checks special users exclusion befaore add new registered user in FluxBB user table 
     68 */ 
     69function Register_FluxBB_Adduser($register_user) 
     70{ 
     71  global $errors, $conf; 
     72         
     73  // Exclusion of Adult_Content users 
     74  if ($register_user['username'] != "16" and $register_user['username'] != "18") 
     75  { 
     76    FluxBB_Adduser($register_user['id'], $register_user['username'], sha1($_POST['password']), $register_user['email']); 
     77  } 
     78} 
     79 
     80/** 
     81 * Delete registered user in FluxBB user table 
     82 */ 
     83function Register_FluxBB_Deluser($user_id) 
     84{ 
     85  FluxBB_Deluser(FluxBB_Searchuser($user_id), true); 
    6386} 
    6487 
     
    85108 
    86109      list($username,$mail_address) = pwg_db_fetch_row(pwg_query($query)); 
    87       // Warning : FluxBB uses Sha1 hash instead of a salted md5 for Piwigo! // TODO: Reset password 
    88110      FluxBB_Updateuser($user_id, stripslashes($username), sha1($_POST['use_new_pwd']), $mail_address); 
    89111    } 
     
    199221 * Users linking in a dedicated links table 
    200222 */ 
    201 function FluxBB_Linkuser($pwg_id, $bb_id) 
    202 { 
     223function FluxBB_Linkuser($pwg_id, $bb_id, $PwdSync) 
     224{ 
     225  global $conf; 
     226 
     227  $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']); 
     228 
    203229  $query = ' 
    204230SELECT pwg.id as pwg_id, bb.id as bb_id 
     
    209235  AND pwg.username NOT IN ("18","16") 
    210236;'; 
    211    
     237 
    212238  $data = pwg_db_fetch_row(pwg_query($query)); 
    213    
    214   if (!empty($data)) 
     239 
     240  if (!empty($data) and !is_null($PwdSync)) 
    215241  { 
    216242    $subquery = ' 
     
    220246;'; 
    221247 
    222     $subresult = pwg_query($subquery); 
     248    pwg_query($subquery); 
    223249 
    224250    $subquery = ' 
    225251INSERT INTO '.Register_FluxBB_ID_TABLE.' 
    226   (id_user_pwg, id_user_FluxBB) 
    227 VALUES ('.$pwg_id.', '.$bb_id.') 
    228 ;'; 
    229  
    230     $subresult = pwg_query($subquery); 
     252  (id_user_pwg, id_user_FluxBB, PwdSynch) 
     253VALUES ('.$pwg_id.', '.$bb_id.', "'.$PwdSync.'") 
     254;'; 
     255 
     256    pwg_query($subquery); 
     257  } 
     258  else 
     259  { 
     260    $PwdSync = NULL; 
     261    $subquery = ' 
     262DELETE FROM '.Register_FluxBB_ID_TABLE.' 
     263WHERE id_user_pwg = "'.$pwg_id.'" 
     264OR id_user_FluxBB = "'.$bb_id.'" 
     265;'; 
     266 
     267    pwg_query($subquery); 
     268 
     269    $subquery = ' 
     270INSERT INTO '.Register_FluxBB_ID_TABLE.' 
     271  (id_user_pwg, id_user_FluxBB, PwdSynch) 
     272VALUES ('.$pwg_id.', '.$bb_id.', "'.$PwdSync.'") 
     273;'; 
     274 
     275    pwg_query($subquery); 
    231276  } 
    232277} 
     
    243288;'; 
    244289 
    245   $result = pwg_query($query); 
     290  pwg_query($query); 
    246291} 
    247292 
     
    259304  $registred = time(); 
    260305  $registred_ip = $_SERVER['REMOTE_ADDR']; 
    261    
    262   // Check if UAM is installed and if bridge is set - Exception for admins and webmasters 
     306 
     307  // Set default FluxBB group - Check if UAM is installed and if bridge is set 
    263308  if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB['FLUXBB_UAM_LINK']) and $conf_Register_FluxBB['FLUXBB_UAM_LINK'] == 'true') 
    264309  { 
     
    276321  } 
    277322 
    278 // Check for FluxBB version 1.4.x or higher and get the correct value 
     323// Check for timezone settings in FluxBB version 1.4.x or higher 
    279324  $query1 = ' 
    280325SELECT conf_value 
     
    285330  $count1 = pwg_db_num_rows(pwg_query($query1)); 
    286331 
    287 // Check for FluxBB version 1.2.x and get the correct value 
     332// Check for timezone settings in FluxBB version 1.2.x 
    288333  $query2 = ' 
    289334SELECT conf_value 
     
    293338 
    294339  $count2 = pwg_db_num_rows(pwg_query($query2)); 
    295    
     340 
     341// Set timezone var according of FluxBB version 
    296342  if ($count1 == 1 and $count2 == 0) 
    297343  { 
     
    302348    $o_default_timezone = pwg_db_fetch_assoc(pwg_query($query2)); 
    303349  } 
    304    
    305    
     350 
     351// Get FluxBB default language 
    306352  $query = ' 
    307353SELECT conf_value 
     
    311357 
    312358  $o_default_lang = pwg_db_fetch_assoc(pwg_query($query)); 
    313    
     359 
     360// Get FluxBB default style 
    314361  $query = ' 
    315362SELECT conf_value 
     
    320367  $o_default_style = pwg_db_fetch_assoc(pwg_query($query)); 
    321368 
    322   // Check if UAM is installed and if bridge is set - Exception for admins and webmasters 
     369  // Add user - Check if UAM is installed and if bridge is set 
    323370  if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB['FLUXBB_UAM_LINK']) and $conf_Register_FluxBB['FLUXBB_UAM_LINK'] == 'true') 
    324371  { 
     
    349396  );"; 
    350397   
    351     $result = pwg_query($query); 
     398    pwg_query($query); 
    352399  } 
    353400  else 
     
    379426  ) 
    380427;"; 
    381     $result = pwg_query($query); 
     428    pwg_query($query); 
    382429  } 
    383430 
    384431  $bb_id = pwg_db_insert_id(); 
    385    
    386   FluxBB_Linkuser($pwg_id, $bb_id); 
    387 } 
    388  
    389  
    390 /** 
    391  * Search linked users 
    392  */ 
    393 function FluxBB_Searchuser($id_user_pwg) 
    394 { 
    395   $query = ' 
    396 SELECT id_user_FluxBB, id_user_pwg 
    397 FROM '.Register_FluxBB_ID_TABLE.' 
    398 WHERE id_user_pwg = '.$id_user_pwg.' 
    399 LIMIT 1 
    400 ;'; 
    401  
    402   $data = pwg_db_fetch_assoc(pwg_query($query)); 
    403    
    404   if (!empty($data)) 
    405     return $data['id_user_FluxBB']; 
    406   else 
    407     return '0';   
    408 } 
    409  
    410  
    411 /** 
    412  * Delete user from FluxBB users table 
    413  * Called from Register_FluxBB_Deluser() 
    414  */ 
    415 function FluxBB_Deluser($id_user_FluxBB, $SuppTopicsPosts) 
     432 
     433  FluxBB_Linkuser($pwg_id, $bb_id, "OK"); 
     434} 
     435 
     436 
     437/** 
     438 * Update user information in FluxBB users table 
     439 */ 
     440function FluxBB_Updateuser($pwg_id, $username, $password, $adresse_mail) 
    416441{ 
    417442  global $conf; 
    418  
     443   
     444  include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 
    419445  $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']); 
    420446 
    421   $query0 = ' 
    422 SELECT username, id 
    423 FROM '.FluxBB_USERS_TABLE.' 
    424 WHERE id = '.$id_user_FluxBB.' 
    425 LIMIT 1 
    426 ;'; 
    427  
    428   $data0 = pwg_db_fetch_assoc(pwg_query($query0)); 
    429  
    430   // If True, delete related topics and posts 
    431   if ($SuppTopicsPosts and $conf_Register_FluxBB['FLUXBB_DEL_PT']) 
    432   { 
    433     // Delete posts and topics of this user 
    434     $subquery = ' 
    435 DELETE FROM '.FluxBB_POSTS_TABLE.' 
    436 WHERE poster_id = '.$id_user_FluxBB.' 
    437 ;'; 
    438  
    439     $subresult = pwg_query($subquery); 
    440  
    441     // Delete topics of this user 
    442     $subquery = ' 
    443 DELETE FROM '.FluxBB_TOPICS_TABLE.' 
    444 WHERE BINARY poster = BINARY "'.pwg_db_real_escape_string($data0['username']).'" 
    445 ;'; 
    446  
    447     $subresult = pwg_query($subquery); 
    448   } 
    449  
    450   // Delete user's subscriptions 
    451   $subquery = ' 
    452 DELETE FROM '.FluxBB_SUBSCRIPTIONS_TABLE.' 
    453 WHERE user_id = '.$id_user_FluxBB.' 
    454 ;'; 
    455  
    456   $subresult = pwg_query($subquery); 
    457    
    458   // Delete user's account 
    459   $subquery = ' 
    460 DELETE FROM '.FluxBB_USERS_TABLE.' 
    461 WHERE id = '.$id_user_FluxBB.' 
    462 ;'; 
    463  
    464   $subresult = pwg_query($subquery); 
    465  
    466   FluxBB_Unlinkuser($id_user_FluxBB); 
    467 } 
    468  
    469  
    470 /** 
    471  * Update user information in FluxBB users table 
    472  */ 
    473 function FluxBB_Updateuser($pwg_id, $username, $password, $adresse_mail) 
    474 { 
    475   include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 
    476  
     447// Select users to update in ID link table 
    477448  $query = ' 
    478449SELECT id_user_FluxBB as FluxBB_id 
     
    491462AND "'.pwg_db_real_escape_string($username).'" NOT IN ("18","16") 
    492463;'; 
    493     
    494     $result = pwg_query($query); 
    495        
    496     FluxBB_Linkuser($pwg_id, $row['FluxBB_id']); 
     464 
     465    pwg_query($query); 
     466 
     467    FluxBB_Linkuser($pwg_id, $row['FluxBB_id'], "OK"); 
    497468  } 
    498469  else 
     
    505476 
    506477    $row = pwg_db_fetch_assoc(pwg_query($query)); 
    507    
     478 
    508479    if (!empty($row)) 
    509480    { 
     
    514485AND "'.pwg_db_real_escape_string($username).'" NOT IN ("18","16") 
    515486;'; 
    516       
    517       $result = pwg_query($query); 
    518        
    519       FluxBB_Linkuser($pwg_id, $row['FluxBB_id']); 
     487 
     488      pwg_query($query); 
     489 
     490      FluxBB_Linkuser($pwg_id, $row['FluxBB_id'], "OK"); 
    520491    } 
    521492  } 
    522493} 
     494 
     495 
     496/** 
     497 * Add new registered user in fluxBB users table from audit/synch action 
     498 * Standard FluxBB_Adduser() function is not used because of existing password mismatch 
     499 * To solve password synch problem, passwords are reset to NULL to force users to get a new password on their profile page 
     500 */ 
     501function Synch_FluxBB_Adduser($pwg_id, $login, $adresse_mail) 
     502{ 
     503  global $errors, $conf; 
     504 
     505  $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']); 
     506 
     507  $registred = time(); 
     508  $registred_ip = $_SERVER['REMOTE_ADDR']; 
     509  $password = NULL; 
     510 
     511  // Set default FluxBB group - Check if UAM is installed and if bridge is set 
     512  if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB['FLUXBB_UAM_LINK']) and $conf_Register_FluxBB['FLUXBB_UAM_LINK'] == 'true') 
     513  { 
     514    $o_default_user_group1 = $conf_Register_FluxBB['FLUXBB_GROUP']; 
     515  } 
     516  else 
     517  { 
     518    $query = ' 
     519SELECT conf_value 
     520FROM '.FluxBB_CONFIG_TABLE.' 
     521WHERE conf_name = "o_default_user_group" 
     522;'; 
     523 
     524    $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 
     525  } 
     526 
     527// Check for timezone settings in FluxBB version 1.4.x or higher 
     528  $query1 = ' 
     529SELECT conf_value 
     530FROM '.FluxBB_CONFIG_TABLE.' 
     531WHERE conf_name = "o_default_timezone" 
     532;'; 
     533 
     534  $count1 = pwg_db_num_rows(pwg_query($query1)); 
     535 
     536// Check for timezone settings in FluxBB version 1.2.x 
     537  $query2 = ' 
     538SELECT conf_value 
     539FROM '.FluxBB_CONFIG_TABLE.' 
     540WHERE conf_name = "o_server_timezone" 
     541;'; 
     542 
     543  $count2 = pwg_db_num_rows(pwg_query($query2)); 
     544 
     545// Set timezone var according of FluxBB version 
     546  if ($count1 == 1 and $count2 == 0) 
     547  { 
     548    $o_default_timezone = pwg_db_fetch_assoc(pwg_query($query1)); 
     549  } 
     550  else if ($count1 == 0 and $count2 == 1) 
     551  { 
     552    $o_default_timezone = pwg_db_fetch_assoc(pwg_query($query2)); 
     553  } 
     554 
     555// Get FluxBB default language 
     556  $query = ' 
     557SELECT conf_value 
     558FROM '.FluxBB_CONFIG_TABLE.' 
     559WHERE conf_name = "o_default_lang" 
     560;'; 
     561 
     562  $o_default_lang = pwg_db_fetch_assoc(pwg_query($query)); 
     563 
     564// Get FluxBB default style 
     565  $query = ' 
     566SELECT conf_value 
     567FROM '.FluxBB_CONFIG_TABLE.' 
     568WHERE conf_name = "o_default_style" 
     569;'; 
     570 
     571  $o_default_style = pwg_db_fetch_assoc(pwg_query($query)); 
     572 
     573  // Add user - Check if UAM is installed and if bridge is set 
     574  if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB['FLUXBB_UAM_LINK']) and $conf_Register_FluxBB['FLUXBB_UAM_LINK'] == 'true') 
     575  { 
     576    $query = " 
     577INSERT INTO ".FluxBB_USERS_TABLE." ( 
     578  username, 
     579  ". ( isset($o_default_user_group1) ? 'group_id' : '' ) .", 
     580  password, 
     581  email, 
     582  ". ( isset($o_default_timezone['conf_value']) ? 'timezone' : '' ) .", 
     583  ". ( isset($o_default_lang['conf_value']) ? 'language' : '' ) .", 
     584  ". ( isset($o_default_style['conf_value']) ? 'style' : '' ) .", 
     585  registered, 
     586  registration_ip, 
     587  last_visit 
     588  ) 
     589VALUES( 
     590  '".pwg_db_real_escape_string($login)."', 
     591  ". ( isset($o_default_user_group1) ? "'".$o_default_user_group1."'" : '' ) .", 
     592  '".$password."',  
     593        '".$adresse_mail."', 
     594  ". ( isset($o_default_timezone['conf_value']) ? "'".$o_default_timezone['conf_value']."'" : '' ) .", 
     595  ". ( isset($o_default_lang['conf_value']) ? "'".$o_default_lang['conf_value']."'" : '' ) .", 
     596  ". ( isset($o_default_style['conf_value']) ? "'".$o_default_style['conf_value']."'" : '' ) .", 
     597  '".$registred."', 
     598  '".$registred_ip."', 
     599  '".$registred."' 
     600  );"; 
     601   
     602    pwg_query($query); 
     603  } 
     604  else 
     605  { 
     606    $query = " 
     607INSERT INTO ".FluxBB_USERS_TABLE." ( 
     608  username, 
     609  ". ( isset($o_default_user_group['conf_value']) ? 'group_id' : '' ) .", 
     610  password, 
     611  email, 
     612  ". ( isset($o_default_timezone['conf_value']) ? 'timezone' : '' ) .", 
     613  ". ( isset($o_default_lang['conf_value']) ? 'language' : '' ) .", 
     614  ". ( isset($o_default_style['conf_value']) ? 'style' : '' ) .", 
     615  registered, 
     616  registration_ip, 
     617  last_visit 
     618  ) 
     619VALUES( 
     620  '".pwg_db_real_escape_string($login)."', 
     621  ". ( isset($o_default_user_group['conf_value']) ? "'".$o_default_user_group['conf_value']."'" : '' ) .", 
     622  '".$password."',  
     623        '".$adresse_mail."', 
     624  ". ( isset($o_default_timezone['conf_value']) ? "'".$o_default_timezone['conf_value']."'" : '' ) .", 
     625  ". ( isset($o_default_lang['conf_value']) ? "'".$o_default_lang['conf_value']."'" : '' ) .", 
     626  ". ( isset($o_default_style['conf_value']) ? "'".$o_default_style['conf_value']."'" : '' ) .", 
     627  '".$registred."', 
     628  '".$registred_ip."', 
     629  '".$registred."' 
     630  ) 
     631;"; 
     632    pwg_query($query); 
     633  } 
     634 
     635  $bb_id = pwg_db_insert_id(); 
     636 
     637  FluxBB_Linkuser($pwg_id, $bb_id, "NOK"); 
     638} 
     639 
     640 
     641/** 
     642 * Search linked users 
     643 */ 
     644function FluxBB_Searchuser($id_user_pwg) 
     645{ 
     646  $query = ' 
     647SELECT id_user_FluxBB, id_user_pwg 
     648FROM '.Register_FluxBB_ID_TABLE.' 
     649WHERE id_user_pwg = '.$id_user_pwg.' 
     650LIMIT 1 
     651;'; 
     652 
     653  $data = pwg_db_fetch_assoc(pwg_query($query)); 
     654   
     655  if (!empty($data)) 
     656    return $data['id_user_FluxBB']; 
     657  else 
     658    return '0';   
     659} 
     660 
     661 
     662/** 
     663 * Delete user from FluxBB users table 
     664 * Called from Register_FluxBB_Deluser() 
     665 */ 
     666function FluxBB_Deluser($id_user_FluxBB, $SuppTopicsPosts) 
     667{ 
     668  global $conf; 
     669 
     670  $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']); 
     671 
     672  $query0 = ' 
     673SELECT username, id 
     674FROM '.FluxBB_USERS_TABLE.' 
     675WHERE id = '.$id_user_FluxBB.' 
     676LIMIT 1 
     677;'; 
     678 
     679  $data0 = pwg_db_fetch_assoc(pwg_query($query0)); 
     680 
     681  // If True, delete related topics and posts 
     682  if ($SuppTopicsPosts and $conf_Register_FluxBB['FLUXBB_DEL_PT']) 
     683  { 
     684    // Delete posts and topics of this user 
     685    $subquery = ' 
     686DELETE FROM '.FluxBB_POSTS_TABLE.' 
     687WHERE poster_id = '.$id_user_FluxBB.' 
     688;'; 
     689 
     690    $subresult = pwg_query($subquery); 
     691 
     692    // Delete topics of this user 
     693    $subquery = ' 
     694DELETE FROM '.FluxBB_TOPICS_TABLE.' 
     695WHERE BINARY poster = BINARY "'.pwg_db_real_escape_string($data0['username']).'" 
     696;'; 
     697 
     698    $subresult = pwg_query($subquery); 
     699  } 
     700 
     701  // Delete user's subscriptions 
     702  $subquery = ' 
     703DELETE FROM '.FluxBB_SUBSCRIPTIONS_TABLE.' 
     704WHERE user_id = '.$id_user_FluxBB.' 
     705;'; 
     706 
     707  $subresult = pwg_query($subquery); 
     708   
     709  // Delete user's account 
     710  $subquery = ' 
     711DELETE FROM '.FluxBB_USERS_TABLE.' 
     712WHERE id = '.$id_user_FluxBB.' 
     713;'; 
     714 
     715  $subresult = pwg_query($subquery); 
     716 
     717  FluxBB_Unlinkuser($id_user_FluxBB); 
     718} 
     719 
    523720 
    524721/** 
  • extensions/Register_FluxBB/include/upgradedb.inc.php

    r21424 r22091  
    6363  pwg_query($q); 
    6464} 
     65 
     66 
     67/* upgrade from 2.5.x to 2.5.5 */ 
     68/* *************************** */ 
     69function upgrade_250_255() 
     70{ 
     71  global $conf; 
     72 
     73  // Add new field in Register_FluxBB ID links table 
     74  $query ='ALTER TABLE '.Register_FluxBB_ID_TABLE.' ADD PwdSynch VARCHAR(3) NULL DEFAULT NULL;'; 
     75  pwg_query($query); 
     76} 
    6577?> 
  • extensions/Register_FluxBB/language/en_UK/plugin.lang.php

    r21424 r22091  
    66$lang['Instruction_Title_d'] = 'Instructions and important information'; 
    77$lang['Disclaimer'] = ' 
     8  <div class="warning">Important : FluxBB and Piwigo must be installed on the same database! For safety, be sure to make a backup of your database and especially your ###_user tables before any action.</div><br/><br/> 
    89  *** To begin, follow this 2 steps ***<br/> 
    9   Step 1 : Configure the plugin parameters related to FluxBB parameters<br/> 
    10   Step 2 : Migrate users accounts from Piwigo to FluxBB<br/><br/> 
    11   After these 2 main steps, the plugin is fully functional.<br/><br/> 
    12   *** For the maintenance of already active connections ***<br/> 
    13   Maintenance : Synchronize tables (in case an addition, an update or a user deletion mismatched) allows to update passwords and email addresses and shows intruders (But you should not have to use it regularly).<br/><br/> 
    14   <div class="warning">WARNING !! For safety, be sure to make a backup of your database and especially your ###_user tables before any action.</div> 
     10  Step 1 - Configuration: Configure the plugin parameters related to FluxBB parameters<br/> 
     11  Step 2 - Synchronization: 
     12  - If your FluxBB forum <b>does not have</b> any users, synchronize all users accounts from Piwigo to FluxBB<br/> 
     13  - If your FluxBB forum <b>does have</b> users, launch an audit. The audit performed consistency tests between Piwigo and FluxBB users data. Based on the results, shares of corrections in each case will be proposed<br/><br/> 
     14 
     15  <div class="warning">So far it is not yet possible to synchronize existing users on a FluxBB forum to a Piwigo gallery. This is why the proposed audit action is deleting FluxBB accounts. You can leave these non-synchronized state accounts (they will be able only to connect to the forum) waiting for the next evolution of the plugin that will do this synchronization.</div> 
    1516<br/><br/> 
     17   
     18  Note: The passwords of manually sync accounts (by audit or the overall sync) from Piwigo to FluxBB are not recovered. Each user concerned should change his password at the next connection to the gallery (he will be automatically redirected to his profile page) so that the sync to be effective and he can connect to the forum. 
     19<br/><br/> 
     20 
    1621  <div class="warning">Important to know:<br/> 
    1722  By default, <b>FluxBB</b> is case <u>insensitive</u> on usernames. That is, if a user called "test" is already registered, other entries like "Test" or "TEST" or "TEst" (etc. ..) will be rejected.<br/><br/> 
     
    100105 
    101106 
    102 $lang['Mig_Title'] = 'Migration of accounts from Piwigo to FluxBB'; 
    103 $lang['Mig_Title_d'] = 'USE ONLY IF you have never used the plugin before'; 
    104 $lang['Mig_Text'] = ' 
    105   <div class="warning"> USE MIGRATION ONLY IF you never used the plugin to link Piwigo to FluxBB before <u>AND IF</u> your forum is empty of users !!!</b></div><br/> 
    106                 --> In this case, your [PrefixFluxBB]_user table of FluxBB must be empty of any account except the 2 "Guest" and "Administrator" accounts.<br/><br/> 
    107   - The migration will first remove the links between accounts of Piwigo and FluxBB if any.<br/> 
    108   - Then <b>ALL FluxBB ACCOUNTS WILL BE DELETE</b> except the 2 "Guest" and "Administrator" accounts.<br/> 
    109   <br/> 
    110   <div class="warning">WARNING - IF YOU HAVE ANY SPECIAL USERS ACCOUNTS IN FluxBB == DO NOT USE THIS FUNCTION !!!</div><br/> 
    111   - Finally, the migration process will create all Piwigo\'s users accounts in FluxBB, except the "Guest".<br/> 
    112   <br/> 
    113   If errors occur during operation, a message will warn you and inform you about the problem. Fix the cause of the problem and retry a migration (at the time only you can renew a migration).<br/> 
    114   You can also run an audit to verify the status of a migration.<br/> 
    115   <div class="warning"> NEVER PERFORM MIGRATION FOR UPDATING !!!</div><br/>'; 
    116 $lang['Mig_Start'] = '<b>Migration of accounts from Piwigo to FluxBB</b>'; 
    117 $lang['Mig_Del_Link'] = '<b>Deleting links between Piwigo and FluxBB accounts</b>'; 
    118 $lang['Mig_Del_AllUsers'] = '<b>Deleting FluxBB accounts</b>'; 
    119 $lang['Mig_Del_User'] = '<b>Account deletion:</b> '; 
    120 $lang['Mig_Add_AllUsers'] = '<b>Transferring Piwigo accounts</b>'; 
    121 $lang['Mig_Add_User'] = '<b>Transferring account:</b> '; 
    122 $lang['Mig_End'] = '<b>Migration done !</b>'; 
    123 $lang['Mig_Btn'] = 'Migration'; 
    124  
    125  
    126107$lang['Sync_Title'] = 'Synchronize accounts from Piwigo to FluxBB'; 
    127108$lang['Sync_Title_d'] = 'Use to resynchronize accounts'; 
    128109$lang['Sync_Text'] = ' 
    129   <div class="warning">Use this if you are already using this plugin, you have temporarily disabled it and new users registered on the gallery in the meantime</div> 
    130   <br/> -> This means that your forum already owns users.<br/><br/> 
    131   - Synchronization compares the usernames, their password (encrypted) and their email address in both tables [PrefixPWG] _users and [PrefixFluxBB] _users<br/> 
    132   - Then it will update a mapping table as well as the password and email address for each account from Piwigo to FluxBB except the Piwigo\'s "Guest" user and FluxBB\'s "Anonymous" user.<br/> 
    133   - Finally it will show orphaned accounts errors (which only exist in one of two ###_USERS tables) and will propose a fix.<br/> 
    134   <br/> 
    135   At the end of the synchronization, you can perform an AUDIT to check for possible duplicates users in FluxBB. If so, delete the oldest ones (sorting FluxBB users according to their date of registration).<br/>'; 
     110  <div class="warning">Synchronization is a mass action that will drain your forum users if there is! Run an audit to manage each case.</div><br/><br/> 
     111   
     112  Reminders :<br/> 
     113  The passwords of manually sync accounts (by audit or the overall sync) from Piwigo to FluxBB are not recovered. Each user concerned should change his password at the next connection to the gallery (he will be automatically redirected to his profile page) so that the sync to be effective and he can connect to the forum.<br/><br/> 
     114  So far it is not yet possible to synchronize existing users on a FluxBB forum to a Piwigo gallery. This is why the proposed audit action is deleting FluxBB accounts. You can leave these non-synchronized state accounts (they will be able only to connect to the forum) waiting for the next evolution of the plugin that will do this synchronization.<br/><br/>'; 
    136115$lang['Sync_Check_Dup'] = '<b>Analysis of user tables for duplicates control</b>'; 
    137116$lang['Advise_Check_Dup'] = '<b>IMPOSSIBLE to continue synchronizing if you have duplicate user accounts in Piwigo or FluxBB. Please correct and try again.</b><br/><br/>'; 
     
    164143$lang['Audit_Synchro'] = '<b>Audit of the synchronization of passwords and email addresses between Piwigo and FluxBB accounts</b>'; 
    165144$lang['Error_Synchro'] = '<b>Bad synchronization of account:</b> '; 
    166 $lang['Error_Synchro_Pswd'] = 'on password'; 
     145$lang['Error_Synchro_Pswd'] = 'This user will have to modify his password at next login to the gallery'; 
    167146$lang['Error_Synchro_Mail'] = 'on email address'; 
    168147$lang['Audit_Synchro_OK'] = ' <b>: Data synchronization OK</b>'; 
     
    176155$lang['Audit_OK'] = 'Audit OK<br/><br/>'; 
    177156 
     157$lang['RegFluxBB_Password_Reset_Msg'] = 'Please, update your password for synchronization with the forum. Then you will be able to connect to the forum with the same account as the gallery.'; 
    178158?> 
  • extensions/Register_FluxBB/language/fr_FR/plugin.lang.php

    r21424 r22091  
    66$lang['Instruction_Title_d'] = 'Notice d\'utilisation et informations importantes'; 
    77$lang['Disclaimer'] = ' 
     8  <div class="warning">Important : FluxBB et Piwigo doivent être installés sur la même base de données ! Pensez faire une sauvegarde de votre base et spécialement de vos tables ###_USERS avant toute action par mesure de sécurité.</div><br/><br/> 
    89  *** Pour débuter, 2 étapes à suivre ***<br/> 
    9   1ère étape : Configurez les paramètres du plugin en relation avec les paramètres de FluxBB<br/> 
    10   2ème étape : Migrez les comptes utilisateurs de Piwigo vers FluxBB<br/><br/> 
    11   A l\'issue des 2 étapes principales, le plugin sera pleinement fonctionnel.<br/><br/> 
    12   *** Pour maintenir les liaisons déjà actives ***<br/> 
    13   Maintenance : Synchronisez les tables (dans le cas où un ajout, une mise à jour ou une suppression d\'utilisateur se serait mal déroulée). Cela permet aussi de remettre à jour mots de passe et adresses email et voir intrus (Mais vous ne devriez pas avoir à l\'utiliser régulièrement).<br/><br/> 
    14   <div class="warning">Pensez faire une sauvegarde de votre base et spécialement de vos tables ###_USERS avant toute action par mesure de sécurité.</div> 
     10  1ère étape - Section Configuration : Configurez les paramètres du plugin en relation avec les paramètres de FluxBB<br/> 
     11  2ème étape - Section Synchronisation :<br/> 
     12  - Si votre forum FluxBB <b>est vide d\'utilisateurs</b>, synchronisez en masse les comptes utilisateurs de Piwigo vers FluxBB<br/> 
     13  - Si votre forum FluxBB <b>contient des utilisateurs</b>, lancez un audit. L\'audit effectue des tests de cohérences entre les données d\'utilisateurs de Piwigo et de FluxBB. En fonction des résultats, des actions de corrections au cas par cas seront proposées<br/><br/> 
     14 
     15  <div class="warning">A ce jour, il n\'est pas encore possible de synchroniser des utilisateurs existants sur un forum FluxBB vers une galerie Piwigo. C\'est pourquoi l\'action proposée par l\'audit est la suppression des comptes FluxBB. Vous pouvez laisser ces comptes non synchronisés en l\'état (il ne pourront se connecter que sur le forum) dans l\'attente d\'une évolution prochaine du plugin qui permettra des les synchroniser.</div> 
    1516<br/><br/> 
     17 
     18  A noter : Les mots de passe de comptes synchronisés manuellement (par l\'audit ou par la synchro globale) de Piwigo vers FluxBB ne sont pas récupérés. Chaque utilisateur concerné devra modifier son mot de passe lors de sa prochaine connexion à la galerie (automatiquement redirigé vers sa page de profil) pour que la synchro soit effective et qu\'il puisse se connecter au forum. 
     19<br/><br/> 
     20 
    1621  <div class="warning">A savoir :<br/> 
    1722  Par défaut, <b>FluxBB</b> est <u>insensible</u> à la casse sur les noms d\'utilisateurs. C\'est à dire que si un utilisateur "test" est déjà inscrit, d\'autres inscriptions avec "Test" ou "TEST" ou "TEst" (etc...) seront refusées.<br/><br/> 
     
    100105 
    101106 
    102 $lang['Mig_Title'] = 'Migration des comptes de Piwigo vers FluxBB'; 
    103 $lang['Mig_Title_d'] = 'A N\'UTILISER QUE SI vous n\'avez jamais utilisé le plugin auparavent'; 
    104 $lang['Mig_Text'] = ' 
    105   <div class="warning"> A N\'EXECUTER QUE SI vous n\'avez jamais utilisé le plugin pour lier Piwigo à FluxBB <u>ET SI</u> votre forum ne contient aucun utilisateurs !!!</div><br/> 
    106                 --> Dans ce cas, votre table [PrefixFluxBB]_users de FluxBB doit être vide de tout compte sauf les 2 comptes d\'invité et administrateur.<br/><br/> 
    107   - La procédure de migration supprimera d\'abord les liens des comptes entre Piwigo et FluxBB si existants<br/> 
    108   - Puis <b>SUPPRIMERA TOUS LES COMPTES de votre forum FluxBB</b> sauf les 2 comptes d\'invité et d\'administrateur.<br/> 
    109   <br/> 
    110   <div class="warning">ATTENTION - SI VOUS AVEZ DES COMPTES D\'UTILISATEURS PARTICULIERS DANS FluxBB == NE SURTOUT PAS UTILISER CETTE FONCTION !!!</div><br/> 
    111   - Enfin la migration créera tout les comptes de Piwigo dans FluxBB sauf l\'invité.<br/> 
    112   <br/> 
    113   Si des erreurs se produisent pendant l\'opération, une information s\'affichera. Corrigez la cause du problème et recommencez l\'opération de migration (à ce moment là seulement vous pouvez renouveller une procédure de migration).<br/> 
    114   Vous pouvez aussi lancer un audit pour vérifier l\'état d\'une migration.<br/> 
    115   <div class="warning">NE JAMAIS EFFECTUER DE MIGRATION POUR METTRE A JOUR !!!</div><br/>'; 
    116 $lang['Mig_Start'] = '<b>Migration des comptes de Piwigo vers FluxBB</b>'; 
    117 $lang['Mig_Del_Link'] = '<b>Suppression des liens entre les comptes Piwigo et FluxBB</b>'; 
    118 $lang['Mig_Del_AllUsers'] = '<b>Suppression des comptes FluxBB</b>'; 
    119 $lang['Mig_Del_User'] = '<b>Suppression du compte :</b> '; 
    120 $lang['Mig_Add_AllUsers'] = '<b>Transfert des comptes Piwigo</b>'; 
    121 $lang['Mig_Add_User'] = '<b>Transfert du compte :</b> '; 
    122 $lang['Mig_End'] = '<b>Migration finie !</b>'; 
    123 $lang['Mig_Btn'] = 'Migration'; 
    124  
    125  
    126107$lang['Sync_Title'] = 'Synchronisation des comptes Piwigo vers FluxBB'; 
    127108$lang['Sync_Title_d'] = 'A utiliser pour resynchroniser les comptes'; 
    128109$lang['Sync_Text'] = ' 
    129   <div class="warning">A exécuter si vous êtes déjà utilisateur de ce plugin, que vous l\'avez temporairement désactivé et que de nouveaux utilisateurs se sont inscrits sur la galerie entre temps</div><br/> 
    130   <br/> -> Ceci signifie que votre forum posséde des utilisateurs.<br/><br/> 
    131   - La synchronisation comparera les noms des utilisateurs, leur mot de passe (crypté) et leur adresse email dans les deux tables [PrefixPWG]_users et [PrefixFluxBB]_users<br/> 
    132   - Puis mettra à jour une table de correspondances ainsi que le mot de passe et l\'adresse email de chaque compte depuis Piwigo vers FluxBB sauf les utilisateurs "Guest" de Piwigo et "Anonymous" de FluxBB.<br/> 
    133   - Enfin indiquera en erreur les comptes orphelins (qui n\'existent que dans l\'une des 2 tables ###_USERS) et proposera une résolution des erreurs.<br/> 
    134   <br/> 
    135   A l\'issue de l\'opération lancez un AUDIT et vérifiez la présence de doublons éventuels dans les utilisateurs de FluxBB, si c\'est le cas, il faut supprimer les plus anciens (triez des utilisateurs FluxBB selon leur date d\'inscription).<br/>'; 
     110  <div class="warning">La synchronisation est une action de masse qui videra votre forum de ses utilisateurs s\'il y en a ! Lancez un audit pour gérer au cas par cas.</div><br/><br/> 
     111   
     112  Rappels :<br/> 
     113  Les mots de passe de comptes synchronisés manuellement (par l\'audit ou par la synchro globale) de Piwigo vers FluxBB ne sont pas récupérés. Chaque utilisateur concerné devra modifier son mot de passe lors de sa prochaine connexion à la galerie (automatiquement redirigé vers sa page de profil) pour que la synchro soit effective et qu\'il puisse se connecter au forum.<br/><br/> 
     114  A ce jour, il n\'est pas encore possible de synchroniser des utilisateurs existants sur un forum FluxBB vers une galerie Piwigo. C\'est pourquoi l\'action proposée par l\'audit est la suppression des comptes FluxBB. Vous pouvez laisser ces comptes non synchronisés en l\'état (il ne pourront se connecter que sur le forum) dans l\'attente d\'une évolution prochaine du plugin qui permettra des les synchroniser.<br/><br/>'; 
    136115$lang['Sync_Check_Dup'] = '<b>Analyse des tables d\'utilisateurs pour contrôle les doublons</b>'; 
    137116$lang['Advise_Check_Dup'] = '<b>IMPOSSIBLE de continuer la synchronisation si vous avez des doublons dans les comptes utilisateurs de Piwigo ou FluxBB. Veuillez corriger puis réessayez.</b><br/><br/>'; 
     
    164143$lang['Audit_Synchro'] = '<b>Audit de la synchronisation des mots de passe et des adresses emails entre les comptes Piwigo et FluxBB</b>'; 
    165144$lang['Error_Synchro'] = '<b>Mauvaise synchronisation du compte :</b> '; 
    166 $lang['Error_Synchro_Pswd'] = 'pour le mot de passe'; 
     145$lang['Error_Synchro_Pswd'] = 'Cet utilisateur devra modifier son mot de passe lors de sa prochaine connexion à la galerie'; 
    167146$lang['Error_Synchro_Mail'] = 'pour l\'adresse email'; 
    168147$lang['Audit_Synchro_OK'] = ' <b>: Synchro des données OK</b>'; 
     
    176155$lang['Audit_OK'] = 'Audit OK<br/><br/>'; 
    177156 
     157$lang['RegFluxBB_Password_Reset_Msg'] = 'Veuillez modifier votre mot de passe pour synchronisation avec l\'accès au forum. Vous pourrez alors vous connecter au forum avec le même compte que pour la galerie.'; 
     158 
    178159?> 
  • extensions/Register_FluxBB/main.inc.php

    r22039 r22091  
    99*/ 
    1010 
    11 /* 
    12 -------------------------------------------------------------------------------- 
    13   Author     : Eric 
    14     email    : lucifer@infernoweb.net 
    15     website  : http://www.infernoweb.net 
    16     PWG user : http://forum.phpwebgallery.net/profile.php?id=1106 
    17 -------------------------------------------------------------------------------- 
    18  
    19 :: HISTORY 
    20  
    21 2.0.0b          - 23/11/08  - Initial release. Basic changes to be available for Piwigo 2.0RC4 
    22  
    23 2.0.1b          - 24/11/08  - Small bug correction on submit button display 
    24  
    25 2.0.2                   - 19/02/09      - Language pack correction 
    26  
    27 2.1.0                   - 25/04/09  - Admin panel with tabsheets 
    28                       - Radio buttons functionnalities corrections (now radio buttons show the configuration saved in database) 
    29                       - Language files (fr - en) improvement 
    30  
    31 2.1.1                   - 30/04/09      - Bug fixed on profile update 
    32  
    33 2.1.2                   - 22/08/09      - Compatibility bug fixed when used with DynamicRecentPeriod plugin 
    34  
    35 2.1.3     - 16/11/09  - Using sha1 hash instead of md5 for password hashing in FluxBB 
    36                       - Escaping all characters in login names and be able to retreive them without slashes - FluxBB does not allow this so Piwigo's user names with escaped characters will not been escaped in FluxBB (ie : "it's" in Piwigo will be "It\'s" in FluxBB) 
    37                       - Code refactoring 
    38                       - Full HTML 4.0 for tpl 
    39  
    40 2.2.0     - 03/04/10  - Piwigo 2.1 compatibility 
    41                       - Adding css file 
    42                       - Templates refactory: Moved with css in a "template" subdirectory of admin directory, Moving icons in template directory, using css rules to improve important text display 
    43                       - functions_Register_FluxBB.inc.php renamed in functions.inc.php 
    44                       - Language files revision 
    45                       - Obsolete files management 
    46  
    47 2.2.1     - 04/04/10  - Bug 1577 fixed : Multiple database support 
    48  
    49 2.2.2     - 23/05/10  - Bug 1674 fixed : Adding of mods for Fluxbb when users loose their password 
    50                       - Adding of German language (Thx to duke) 
    51  
    52 2.2.3     - 23/05/10  - Bug 1674 re-fixed : Bad link fixed 
    53                       - Re-adding of German language that was missed at last release :-( (Thx to duke) 
    54  
    55 2.2.4     - 22/08/10  - Bug 1812 fixed : Compliance with FluxBB 1.4 
    56  
    57 2.3.0     - 28/08/10  - Bug 1434 fixed : Bridge between Register_FluxBB and UserAdvManager for new users validation 
    58  
    59 2.3.1     - 31/08/10  - Bug 1825 fixed : Password corruption after Piwigo's profile page visit 
    60  
    61 2.3.2     - 11/09/10  - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation 
    62  
    63 2.3.3     - 13/09/10  - Bug 1853 fixed : Add of controls on plugin configuration settings to avoid some mistakes 
    64                       - Bug 1855 fixed : Improvement of use of UAM bridge (fixes php notices) 
    65                       - Several language files fix 
    66  
    67 2.3.4     - 22/09/10  - Compatibility with Plugin Adult_Content 
    68  
    69 2.3.5     - 02/12/10  - Bug 2047 fixed : Check case sensitivity for logins in FluxBB's user table 
    70                       - Code refactory and optimization 
    71  
    72 2.3.6     - 08/12/10  - Bug 2051 fixed : Compatibility with Captcha 
    73  
    74 2.3.7     - 31/01/11  - Bug 2154 fixed : Bad fluxbb table name 
    75  
    76 2.4.0     - 26/03/11  - Compliance with Piwigo 2.2 
    77  
    78 2.4.1     - 29/03/11  - Enhanced compliance with Piwigo 2.2 (using combine_css) 
    79  
    80 2.4.2     - 02/04/11  - Bug fixed on previous version update 
    81  
    82 2.4.3     - 26/04/11  - Small CSS bug fixed 
    83  
    84 2.4.4     - 11/05/12  - Small code refactory 
    85                         Compatibility with Piwigo 2.4 and FluxBB 1.5 verifyed 
    86  
    87 2.4.5     - 13/05/12  - Update translations - Thx to ddtddt 
    88  
    89 2.4.6     - 16/06/12  - Add it_IT, thanks to : Gdvpixel and Ericnet 
    90                       - Add uk_UA, thanks to : animan 
    91                       - Add ru_RU, thanks to : nadusha 
    92  
    93 2.4.7     - 06/08/12  - Update it_IT, thanks to : Ericnet 
    94                       - Update ru_RU, thanks to : rocket 
    95                       - Add cs_CZ - Česky – Czech, Thanks to : webprostor 
    96                       - Update uk_UA, thanks to : animan 
    97                       - Update el_GR, thanks to : bas_alba 
    98  
    99 2.4.8     - 05/10/12  - Update uk_UA, thanks to : animan 
    100                       - Update it_IT, thanks to : virgigiole 
    101                       - Add da_DK, thanks to : Kaare 
    102                       - Add es_ES, thanks to : petaqui 
    103  
    104 2.4.9     - 22/11/12  - Update es_ES, thanks to : jpr928 
    105                       - Update tr_TR, thanks to : LazBoy 
    106                       - Update it_IT, thanks to : virgigiole 
    107                       - Update pl_PL, thanks to : kuba 
    108                       - Bad explanation in inline tips fixed 
    109  
    110 2.5.0     - 10/03/13  - Compliance with Piwigo 2.5 
    111                       - Code refactory : Plugin's configuration vars are now serialized in database 
    112                       - Admin panel refactory : No more tabs 
    113                       - Admin panel refactory : Clear and dark administration theme compatibility 
    114                       - English language reference review 
    115                       - Compliance improved with FluxBB 1.5 - Register_FluxBB is still compatible with 1.2 and 1.4 FluxBB forums 
    116                       - Update tr_TR, thanks to : LazBoy 
    117                       - Update it_IT, thanks to : Ericnet 
    118                       - Update pl_PL, thanks to : K.S. 
    119  
    120 2.5.1     - 10/03/13  - Fix Bad submit button align 
    121                       - Fix admin panel display issue 
    122                       - Update es_ES, thanks to : jpr928 
    123  
    124 2.5.2     - 29/03/13  - Bug fixed : Missing PHInfos() error 
    125                       - Update tr_TR, thanks to : LazBoy 
    126                       - Update lv_LV, thanks to : agrisans 
    127                       - Update ru_RU, thanks to : marchelly 
    128                       - Update el_GR, thanks to : bas_alba 
    129                       - Update it_IT, thanks to : lucser 
    130                       - Update da_DK, thanks to : Kaare 
    131                       - Update de_DE, thanks to : Yogie 
    132  
    133 2.5.3     - 30/03/13  - Bug fixed : MySql error after installation from scratch 
    134  
    135 2.5.4     - ../../..  - Bug fixed : Admins passwords synchronization between FluxBB and Piwigo when changed 
    136                       - Bug fixed : Password synchronization between FluxBB and Piwigo if a user uses Piwigo's password recovery system 
    137                       - Bug fixed : Exclude password comparison from audit 
    138                       - Todo : Recode synch, migration and audit actions for existing users before plugin activation - Have to take care on passwords ! 
    139 -------------------------------------------------------------------------------- 
    140 */ 
    141  
    14211if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    14312 
     
    14716include_once (REGFLUXBB_PATH.'include/functions.inc.php'); 
    14817 
     18load_language('plugin.lang', REGFLUXBB_PATH); 
    14919 
    15020/* plugin administration */ 
     
    16333add_event_handler('delete_user', 'Register_FluxBB_Deluser'); 
    16434 
     35// Redirection to profile page 
     36// --------------------------- 
     37add_event_handler('login_success', 'Register_FluxBB_Login'); 
    16538 
    16639/* Profile management */ 
    16740if (script_basename() == 'profile') 
    16841{ 
    169   add_event_handler('loc_begin_profile', 'Register_FluxBB_InitPage', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
     42  add_event_handler('loc_begin_profile', 'Register_FluxBB_InitProfile', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    17043} 
    17144 
  • extensions/Register_FluxBB/maintain.inc.php

    r21424 r22091  
    5454  id_user_pwg smallint(5) NOT NULL default "0", 
    5555  id_user_FluxBB int(10) NOT NULL default "0", 
     56  PwdSynch varchar(3) default NULL, 
    5657PRIMARY KEY  (id_user_pwg), 
    57   KEY id_user_pwg (id_user_pwg, id_user_FluxBB) 
     58  KEY id_user_pwg (id_user_pwg, id_user_FluxBB, PwdSynch) 
    5859) 
    5960;'; 
     
    7172  regfluxbb_obsolete_files(); 
    7273 
    73 include_once (REGFLUXBB_PATH.'include/upgradedb.inc.php'); 
     74  include_once (REGFLUXBB_PATH.'include/upgradedb.inc.php'); 
    7475 
    7576/* Database upgrade */ 
     
    8081  { 
    8182    upgrade_240_250(); 
     83  } 
     84 
     85/* Check database upgrade for version > 2.5.0 */ 
     86/* ****************************************** */ 
     87  $conf_Register_FluxBB = unserialize($conf['Register_FluxBB']); 
     88 
     89  if (isset($conf_Register_FluxBB['REGFLUXBB_VERSION'])) 
     90  { 
     91    if (version_compare($conf_Register_FluxBB['REGFLUXBB_VERSION'], '2.5.5') < 0) 
     92    { 
     93    /* upgrade from 2.5.x to 2.5.5 */ 
     94    /* *************************** */ 
     95      upgrade_250_255(); 
     96    } 
    8297  } 
    8398 
Note: See TracChangeset for help on using the changeset viewer.