function Register_PhpBB_Adduser($register_user) { global $conf; // Exclusion of Adult_Content users if ($register_user['username'] != "16" and $register_user['username'] != "18") { include_once REGPHPBB_PATH . 'include/functions.inc.php'; // Warning : PhpBB uses md5 hash like Piwigo, but not like PhpBB ! PhpBB_Adduser($register_user['id'], $register_user['username'], md5($_POST['password']), $register_user['email']); } }
} } } if ($msg_error_Synchro == '') { array_push($page['infos'], l10n('Sync_DataUser') . '<br>' . l10n('Sync_OK')); } else { $msg_error_Synchro = l10n('Sync_DataUser') . $msg_error_Synchro; } $query = "\nSELECT username, mail_address FROM " . USERS_TABLE . "\nWHERE BINARY username <> BINARY 'guest'\nAND id not in (\n SELECT id_user_pwg FROM " . Register_PhpBB_ID_TABLE . "\n )\nAND BINARY username not in (\n SELECT username FROM " . PhpBB_USERS_TABLE . "\n )\nORDER BY LOWER(username)\n;"; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { $msg_error_PWG2PhpBB .= '<br>' . l10n('Add_User') . stripslashes($row['username']) . ' (' . $row['mail_address'] . ')'; $query = "\nSELECT id, username, password, mail_address\nFROM " . USERS_TABLE . "\nWHERE BINARY username = BINARY '" . $row['username'] . "'\nLIMIT 1\n;"; $data = pwg_db_fetch_assoc(pwg_query($query)); if (!empty($data)) { PhpBB_Adduser($data['id'], stripslashes($data['username']), $data['password'], $data['mail_address']); } } if ($msg_error_PWG2PhpBB == '') { array_push($page['infos'], l10n('Sync_PWG2PhpBB') . '<br>' . l10n('Sync_OK')); } else { $msg_error_PWG2PhpBB = l10n('Sync_PWG2PhpBB') . $msg_error_PWG2PhpBB; } $query = "\nSELECT user_id, username, group_id, user_email FROM " . PhpBB_USERS_TABLE . "\nWHERE BINARY username <> BINARY '" . $conf_Register_PhpBB[2] . "'\nAND user_id not in (\n SELECT id_user_PhpBB FROM " . Register_PhpBB_ID_TABLE . "\n )\nAND BINARY username not in (\n SELECT username FROM " . USERS_TABLE . "\n )\nAND group_id <> '6'\nORDER BY LOWER(username)\n;"; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { $msg_error_PhpBB2PWG .= '<br>' . l10n('Error_PhpBB2PWG') . stripslashes($row['username']) . ' (' . $row['user_email'] . ')'; $msg_error_PhpBB2PWG .= ' <a href="'; $msg_error_PhpBB2PWG .= add_url_params($page_Register_PhpBB_admin, array('action' => 'del_user', 'user_id' => $row['user_id'])); $msg_error_PhpBB2PWG .= '" title="' . l10n('Del_User') . stripslashes($row['username']) . '"'; $msg_error_PhpBB2PWG .= $conf_Register_PhpBB[3] == 'false' ? ' onclick="return confirm(\'' . l10n('Are you sure?') . '\');" ' : ' ';