Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-27 14:24:54

chenggao
New Member
Registered: 2006-03-27
Posts: 3

How to import Wordpress users into TXP?

My two sites suffer from high server load, and I am converting them to TXP. Now I have a thorny problem to solve. Since sites are multiuser blogs (based on WP), I need import user table besides articles. I got no answer through searching. Anyone can give me a little light?
TIA!

Offline

#2 2006-03-27 14:41:30

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: How to import Wordpress users into TXP?

How many authors do you have? If it’s only a few you could probably simply create the authors in textpattern and give them the exact same names as they had in wordpress.

Offline

#3 2006-03-27 14:50:10

chenggao
New Member
Registered: 2006-03-27
Posts: 3

Re: How to import Wordpress users into TXP?

Bad news is I have several hundreds of users. So I need an automatic import way.

Offline

#4 2006-03-27 15:12:44

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: How to import Wordpress users into TXP?

Ok, manually is not the way to go, then. :)

It still is not pretty hard. You could probably write a little plugin, or adapt the import script to do the following:

1. fetch all wordpress-users.

2.
//for each user do the following:
$nonce = md5( uniqid( rand(), true ) );
$pass = generate_password(6);
mysql_query("INSERT INTO ".PFX."txp_users (privs, name, pass, RealName, email, nonce) VALUES (4,'$name',password(lower('$pass')),'$RealName','$email','$nonce')");

$name, $RealName, $email will come from the wordpress-db. You’ll have to escape all variables (you can use doSlash()), and you’ll need to re-send all passwords, since Wordpress uses a different hash of the password and a conversion is not possible.

Offline

#5 2006-03-27 15:20:17

chenggao
New Member
Registered: 2006-03-27
Posts: 3

Re: How to import Wordpress users into TXP?

Thanks Sencer.

I know it can be solved by a home brewed import script. I have many users, and many of them have articles. I need import users and link them to their articles.
I have not studied password schema of TXP. Anyway even if it’s not md5, I can adopt TXP to use md5 and thus I need not resend password.
Anyway I am just a lazybone. If there is any script to pick up, I wont bother to spend time in it.
If not (WHAT A BAD NEWS!), I have to do by myself.

Offline

Board footer

Powered by FluxBB