Indeed your reference to :
Code: Select all
array('login_name', 'members.member_name', 'smf_set_encoding'),
holds the key to some resolution of this issue.
What I've found is that the array is constructed as follows:
Code: Select all
array('ltarget field in phpbb3 db', 'source field from smf db', 'encoding management switch'),
Once this is clear, adjustments are fairly straightforward in terms of the data transfer itself.
Mapping is still rather complicated by the need to understand functionality on either end.
The lines around your original reference are:
Code: Select all
array('username', 'members.real_name', 'smf_set_encoding'), // recode to utf8 with default lang
array('username_clean', 'members.real_name', array('function1' => 'smf_set_encoding', 'function2' => 'utf8_clean_string')),
array('login_name', 'members.member_name', 'smf_set_encoding'),
What I have found so far is that changing the content going to username_clean to members_member_name allows login to the cart to work correctly when using the previous SMF member handle as the login id.
Once that is working however, you still cannot log into the admin control panel, because for some reason you must have the a user id which is identical to the admin login id.
Oh joy.
I suspect that this means both username and username clean must be identical (other than the obvious lowercasing in the username_clean field) OR that the login_name must be identical to whichever is used to handle authentication. More work ahead.....
ddonzal wrote:OK... so I did a clean install of phpBB3, and you're correct. There's no login_name. So I looked in the funtions_smf20.php file and found:
Code: Select all
// Add login_name field to users table if NOT exists
function smf_add_login_field()
{
global $db, $table_prefix;
$drop_sql = 'ALTER TABLE ' . USERS_TABLE . ' DROP login_name, DROP user_passwd_salt';
$create_login_name_sql = 'ALTER TABLE ' . USERS_TABLE . ' ADD login_name VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT \'\' NOT NULL';
$create_salt_sql = 'ALTER TABLE ' . USERS_TABLE . ' ADD user_passwd_salt VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT \'\' NOT NULL';
$db->sql_return_on_error(true);
$db->sql_query($drop_sql);
$db->sql_query($create_login_name_sql);
$db->sql_query($create_salt_sql);
$db->sql_return_on_error(false);
}
And in convert_smf20.php file and found:
Code: Select all
array('login_name', 'members.member_name', 'smf_set_encoding'),
So it's the converter. Either way, it's in there and it's using the wrong data. What now?
Don