User migration problem from vBulletin
Posted: 13 January 2006 04:56 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

we have followed various instructions to migrate users over from vBulletin.  It seems to work fine but:

1.  Our test user (member of the members group id=5) does not seem to be a member in reality.  This test user can sign in view the forum but cannot reply to a thread
2.  Cannot access the members only page we have created.  If I register a new user, it works fine.

The only difference I see in the exp_member table is the unique_id field.  It is blank for the migrated users and contains data for my new registered user.

Any ideas??

Profile
 
 
Posted: 13 January 2006 05:28 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

Might take a look at the EEWiki- double check there’s associated data in exp_member_data and exp_member_homepage.  I think the unique_id is generated at login- but I’d have to look to be sure.  Double check the other tables before I do.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 13 January 2006 05:44 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

Have checked these aswell, the migration was done according to that particular tutorial.  It seems to be the unique_id field.

1. I have registered 2 new users and they both have regular members priveliges and can start topics within the forum.
2. My migrated users can do neither of these things.

The only difference is there is entries in the unique id fields for the new users and none for the migrated users.  Can this field be populated with a new uniqu id for each member???

Todd

Profile
 
 
Posted: 13 January 2006 06:10 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

Hm- looking at the regular registration process - system/modules/member/mod.memeber_register.php - looks like the unique_id is generated a la:

$data['unique_id']   = $FNS->random('encrypt');

So, could try something like:

<?php
global $DB, $FNS;
$unique_id = $FNS->random('encrypt');

$data = array('unique_id' => $unique_id);

$sql = $DB->update_string('exp_member', $data, "member_id = 'x'");

$DB->query($sql);

echo
$DB->affected_rows." rows were updated.";

?>


Note- make sure to have a clean backup before you go messing about.  Anyway- for author_id = x put in the id of whoever is going to test it for you.  Stick the php on a template with php parsing turned on- view the file - should tell you 1 row was update- check the table- have a unique id in it?  Can your test member login?  If so, we’ll be good to go.

Note- haven’t tested the code- but looks right.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 13 January 2006 06:34 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

This seems to have fixed the new topic issue.  That user can now post new topics, but still cannot access the members only page, which is just set in the template’s access section.

Can I generate a blanket of new id’s for a range of users?

——————————————————————
Sorry, an update.

Further to this, it seems that on checking the exp_members table there is still no entry in the unique_id field.

Any ideas?  Sorry to be such a burden about this.  OUr site is ready to go live all bar this.

Todd

Profile
 
 
Posted: 13 January 2006 06:37 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

Try having them log out, clear all of their cookies and log back in again (making certain they are actually assigned to a group with proper permission).  I’ll put together some code to loop through your missing members.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 13 January 2006 06:44 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

Sorry, an update.

Further to this, it seems that on checking the exp_members table there is still no entry in the unique_id field.

Any ideas?  Sorry to be such a burden about this.  OUr site is ready to go live all bar this.

Todd

———————

will try the clearing the cookies now.

Profile
 
 
Posted: 13 January 2006 06:49 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

Hard for me to test this stuff on my install- any way you can email superadmin password/login info so I can take a closer look?  The backend suggests the unique_id is the basis for a cookie setting.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 13 January 2006 06:53 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

Cleared the cookies but no joy.  Even when i make this user a member of SuperAdmins, clear the cookies and login it still does not go to this page.  I am sure its linked to the unique_id field not actually showing anything.

Profile
 
 
Posted: 13 January 2006 07:20 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

An FYI if someone else runs into this- there’s an error in the insert above- should be exp_members rather than exp_member - thus no unique id added.  Went with the below to add ids for all missing values:

<?php
global $DB, $FNS;


$member_ids = array();

$query = $DB->query("SELECT member_id FROM exp_members WHERE unique_id = ''");
foreach(
$query->result as $row)
{
$member_ids[]
= $row['member_id'];
}


foreach($member_ids as $value)
{

$unique_id
= $FNS->random('encrypt');
$data = array('unique_id' => $unique_id);

$sql = $DB->update_string('exp_members', $data, "member_id = '$value'");

$DB->query($sql);

}

?>

Hopefully that will do the trick.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 14 January 2006 10:01 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
RankRank
Total Posts:  209
Joined  07-04-2005

Once again Rob, thankyou so much. I think this mught help a lot of vBulletin migrators.  In our case, we didn’t need to migrate threads and posts, we started fresh, so it wasn’t a full blown migration, just users.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66395 Total Logged-in Users: 28
Total Topics: 84728 Total Anonymous Users: 26
Total Replies: 454725 Total Guests: 183
Total Posts: 539453    
Members ( View Memberlist )