Joomla 1.5 + phpBB3 User Table Integration. Please help! - Joomla! Forum - community, help and support
here have done facilitiate shared user database between phpbb3 rc1 , joomla 1.5.
can please tell me if way this...all registrations handled third party application, can handle separately. don't know if changed right files, , if there easier way, or whatever, , know if there better way accomplish way have attempted. want stable solution, useful me long time. thanks.
i have made these changes:
and created phpscript handle acl permission setup:
can please tell me if way this...all registrations handled third party application, can handle separately. don't know if changed right files, , if there easier way, or whatever, , know if there better way accomplish way have attempted. want stable solution, useful me long time. thanks.
i have made these changes:
code: select all
mysql password field modification
includes/functions_user.php
find
'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '',
replace
'user_password' => (isset($user_row['password'])) ? $user_row['password'] : '',
includes/auth.php
find
$sql = 'select user_id, username, user_password, user_passchg, user_email, user_type
replace
$sql = 'select user_id, username, password, user_passchg, user_email, user_type
includes/acp/acp_users.php
find
$update_password = ($data['new_password'] && $user_row['user_password'] != md5($data['new_password'])) ? true : false;
replace
$update_password = ($data['new_password'] && $user_row['password'] != md5($data['new_password'])) ? true : false;
includes/auth/auth_apache.php
find
$sql = 'select user_id, username, user_password, user_passchg, user_email, user_type
replace
$sql = 'select user_id, username, password, user_passchg, user_email, user_type
includes/auth/auth_db.php
find
$sql = 'select user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
replace
$sql = 'select user_id, username, password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
find
if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])
replace
if (md5($password_old_format) == $row['password'] || md5(utf8_to_cp1252($password_old_format)) == $row['password'])
find
set user_password = \'' . $db->sql_escape(md5($password_new_format)) . '\',
replace
set password = \'' . $db->sql_escape(md5($password_new_format)) . '\',
find
$row['user_password'] = md5($password_new_format);
replace
$row['password'] = md5($password_new_format);
find
if (!$row['user_pass_convert'] && md5($password) == $row['user_password'])
replace
if (!$row['user_pass_convert'] && md5($password) == $row['password'])
includes/auth/auth_ldap.php
find
$sql ='select user_id, username, user_password, user_passchg, user_email, user_type
replace
$sql ='select user_id, username, password, user_passchg, user_email, user_type
mysql email field modification
viewtopic.php
find
$user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpex", "mode=email&u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
replace
$user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpex", "mode=email&u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['email']);
memberlist.php
find
$sql = "select user_id, username, user_email, user_lang, $sql_field
replace
$sql = "select user_id, username, email, user_lang, $sql_field
includes/functions_user.php
find
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
replace
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['email']) || !isset($user_row['user_type']))
find
'user_email' => strtolower($user_row['user_email']),
replace
'user_email' => strtolower($user_row['email']),
find
'user_email_hash' => crc32(strtolower($user_row['user_email'])) . strlen($user_row['user_email']),
replace
'user_email_hash' => crc32(strtolower($user_row['email'])) . strlen($user_row['email']),
find
$sql = 'select user_id, user_email, username_clean
replace
$sql = 'select user_id, email, username_clean
find
$founder[$row['user_id']] = $row['user_email'];
replace
$founder[$row['user_id']] = $row['email'];
line 981?
find
$sql = 'select u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
replace
$sql = 'select u.user_id, u.email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/functions_privmsgs.php
find
$sql = 'select user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
replace
$sql = 'select user_id, username, email, user_lang, user_notify_pm, user_notify_type, user_jabber
find
if ($row['user_notify_pm'] == 1 && trim($row['user_email']))
replace
if ($row['user_notify_pm'] == 1 && trim($row['email']))
find
'email' => $row['user_email'],
replace
'email' => $row['email'],
includes/functions_posting.php
find
$sql = 'select u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
replace
$sql = 'select u.user_id, u.username, u.email, u.user_lang, u.user_notify_type, u.user_jabber
find
'user_email' => $row['user_email'],
replace
'user_email' => $row['email'],
find
$sql = 'select u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
replace
$sql = 'select u.user_id, u.username, u.email, u.user_lang, u.user_notify_type, u.user_jabber
find
'user_email' => $row['user_email'],
replace
'user_email' => $row['email'],
find
if (!$row['allowed'] || !trim($row['user_email']))
replace
if (!$row['allowed'] || !trim($row['email']))
find
$msg_list_ary[$row['template']][$pos]['email'] = $row['user_email'];
replace
$msg_list_ary[$row['template']][$pos]['email'] = $row['email'];
find
$sql = 'select user_id, username, password, user_passchg, user_email, user_type
replace
$sql = 'select user_id, username, password, user_passchg, email, user_type
includes/ucp/ucp_resend.php
find
$sql = 'select user_id, group_id, username, user_email, user_type, user_lang, user_actkey, user_inactive_reason
replace
$sql = 'select user_id, group_id, username, email, user_type, user_lang, user_actkey, user_inactive_reason
find
where user_email = '" . $db->sql_escape($email) . "'
replace
where email = '" . $db->sql_escape($email) . "'
find
$messenger->to($user_row['user_email'], $user_row['username']);
replace
$messenger->to($user_row['email'], $user_row['username']);
find
'email_address' => $user_row['user_email'])
replace
'email_address' => $user_row['email'])
find
$sql = 'select user_id, username, user_email, user_lang, user_jabber, user_notify_type
replace
$sql = 'select user_id, username, email, user_lang, user_jabber, user_notify_type
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/ucp/ucp_remind.php
find
$sql = 'select user_id, username, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
replace
$sql = 'select user_id, username, email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
find
where user_email = '" . $db->sql_escape($email) . "'
replace
where email = '" . $db->sql_escape($email) . "'
find
$messenger->to($user_row['user_email'], $user_row['username']);
replace
$messenger->to($user_row['email'], $user_row['username']);
includes/ucp/ucp_register.php
find
$sql = 'select user_id, username, user_email, user_lang, user_jabber, user_notify_type
replace
$sql = 'select user_id, username, email, user_lang, user_jabber, user_notify_type
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/ucp/ucp_profile.php
find
$sql = 'select user_id, username, user_email, user_lang, user_jabber, user_notify_type
replace
$sql = 'select user_id, username, email, user_lang, user_jabber, user_notify_type
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/ucp/ucp_pm_viewmesage.php
find
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpex", "mode=email&u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
replace
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpex", "mode=email&u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['email'])) ? '' : 'mailto:' . $user_row['email']);
includes/ucp/ucp_groups.php
find
$sql = 'select ug.*, u.username, u.username_clean, u.user_email
replace
$sql = 'select ug.*, u.username, u.username_clean, u.email
find
$sql = 'select u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
replace
$sql = 'select u.username, u.username_clean, u.email, u.user_notify_type, u.user_jabber, u.user_lang
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/ucp/ucp_activate.php
find
$sql = 'select user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
replace
$sql = 'select user_id, username, user_type, email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
find
$messenger->to($user_row['user_email'], $user_row['username']);
replace
$messenger->to($user_row['email'], $user_row['username']);
includes/mcp/mcp_reports.php
find
$sql = 'select r.report_id, r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
replace
$sql = 'select r.report_id, r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.email, u.user_jabber, u.user_lang, u.user_notify_type
includes/auth/auth_apache.php
find
$sql = 'select user_id, username, password, user_passchg, user_email, user_type
replace
$sql = 'select user_id, username, password, user_passchg, email, user_type
includes/auth/auth_db.php
find
$sql = 'select user_id, username, password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
replace
$sql = 'select user_id, username, password, user_passchg, user_pass_convert, email, user_type, user_login_attempts
includes/auth/auth_ldap.php
find
$sql ='select user_id, username, user_password, user_passchg, user_email, user_type
replace
$sql ='select user_id, username, user_password, user_passchg, email, user_type
includes/acp/acp_email.php
find
$sql = 'select username, user_email, user_jabber, user_notify_type, user_lang
replace
$sql = 'select username, email, user_jabber, user_notify_type, user_lang
find
$sql = 'select u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
replace
$sql = 'select u.email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
find
$sql = 'select username, username_clean, user_email, user_jabber, user_notify_type, user_lang
replace
$sql = 'select username, username_clean, email, user_jabber, user_notify_type, user_lang
find
if (($row['user_notify_type'] == notify_email && $row['user_email']) ||
replace
if (($row['user_notify_type'] == notify_email && $row['email']) ||
find
($row['user_notify_type'] == notify_both && $row['user_email'] && $row['user_jabber']))
replace
($row['user_notify_type'] == notify_both && $row['email'] && $row['user_jabber']))
find
$email_list[$j][$i]['email'] = $row['user_email'];
replace
$email_list[$j][$i]['email'] = $row['email'];
includes/acp/acp_inactive.php
find
$sql = 'select user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
replace
$sql = 'select user_id, username, email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
find
$messenger->to($row['user_email'], $row['username']);
replace
$messenger->to($row['email'], $row['username']);
includes/acp/acp_prune.php
find
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
replace
$sort_by_types = array('username', 'email', 'user_posts', 'user_regdate', 'user_lastvisit');
find
$where_sql .= ($email) ? " , user_email '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : '';
replace
$where_sql .= ($email) ? " , email '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : '';
includes/acp/acp_users.php
find
$ban[] = $user_row['user_email'];
replace
$ban[] = $user_row['email'];
find
$messenger->to($user_row['user_email'], $user_row['username']);
replace
$messenger->to($user_row['email'], $user_row['username']);
find
'email' => strtolower(request_var('user_email', $user_row['user_email'])),
replace
'email' => strtolower(request_var('user_email', $user_row['email'])),
find
if ($data['email'] != $user_row['user_email'])
replace
if ($data['email'] != $user_row['email'])
find
array('email', $user_row['user_email'])
replace
array('email', $user_row['email'])
find
if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email'])
replace
if ($data['email'] != $user_row['email'] && $data['email_confirm'] != $data['email'])
find
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
replace
$update_email = ($data['email'] != $user_row['email']) ? $data['email'] : false;
find
add_log('user', $user_id, 'log_user_update_email', $user_row['username'], $user_row['user_email'], $update_email);
replace
add_log('user', $user_id, 'log_user_update_email', $user_row['username'], $user_row['email'], $update_email);
find
'user_email' => $user_row['user_email'],
replace
'user_email' => $user_row['email'],
includes/constants.php
find
define('users_table', $table_prefix . 'users');
replace
define('users_table', 'jos_users');
mysql database changes
change user_email , user_password email , password respectively.
run
alter table `phpbb_users` add `id` int( 11 ) not null ,
add `name` text not null ,
add `usertype` varchar( 75 ) not null ,
add `block` tinyint( 4 ) not null ,
add `sendemail` tinyint( 4 ) not null ,
add `gid` tinyint( 3 ) not null ,
add `registerdate` datetime not null ,
add `lastvisitdate` datetime not null ,
add `activation` varchar( 100 ) not null ,
add `params` text not null ;
run
update phpbb_users set block = 0, sendemail = 1, gid = 18
back up
jos_users
drop
jos_users
rename
phpbb_users jos_users
run
update jos_users set id = user_id
run
alter table `jos_users` add index ( `id` )
run
update jos_users set usertype = 'super administrator' username = 'slwx katscher'
run
update jos_users set gid = 25 username = '[your admin's username here]'
run
update jos_users set name = username
clear
your cookies in browser current domain
run
select user_id `jos_users` username = '[your admin's username here]'
write down user_id
run
update `jos_core_acl_aro` set `value` = '[your admin's user_id here]', `name` = '[your admin's username here]' `id` =10 limit 1
and created phpscript handle acl permission setup:
code: select all
<?php
# database name
$db = "";
# database host
$host = "";
# mysql username
$usr = "";
# mysql password
$pwd = "";
# admin user_id
$admin_id = "[your admin's user_id here]";
// not edit below line
// mysql connect string
mysql_pconnect("$host","$usr","$pwd");
// mysql database select
mysql_select_db("$db");
$result = mysql_query("select user_id, name jos_users");
while($r=mysql_fetch_array($result)){
$value = $r["user_id"];
$name = $r["name"];
if($user_id != $admin_id) {
$result2 = mysql_query("insert jos_core_acl_aro (section_value, value, order_value, name, hidden)".
"values ('users', '$value', '0', '$name', '0')");
echo "inserting $name jos_core_acl_aro<br>";
}else
$admin_aro_id = $value;
}
if (!$result) { echo("error: " . mysql_error() . "\n"); }
if (!$result2) { echo("error: " . mysql_error() . "\n"); }
$result = mysql_query("select id jos_core_acl_aro");
while($r=mysql_fetch_array($result)){
$aro_id = $r["id"];
if($aro_id != $admin_aro_id){
$result2 = mysql_query("insert jos_core_acl_groups_aro_map (group_id, section_value, aro_id)".
"values ('18', '', '$aro_id')");
echo "inserting $aro_id jos_core_acl_groups_aro_map<br>";
}
}
if (!$result) { echo("error: " . mysql_error() . "\n"); }
if (!$result2) { echo("error: " . mysql_error() . "\n"); }
echo "<br><br>if don't see errors above, went planned!";
?>
its nice see there lot of people here willing newbies.
i considering not using joomla! because of this. thanks.
i considering not using joomla! because of this. thanks.
Comments
Post a Comment