[wp-hackers] Sharing Users/authentication

Curt Woodard clwoodard at gmail.com
Sat Aug 25 12:21:29 GMT 2007

Well, good news! I have used a VIEW to be able to log into WP using
SMF's user table! :)

Bad News... I forgot which files I messed with... heh

Actually, the main part is that I updated wp-config to define a custom
user table. Then I overrode a lot of the pluggable functions that WP
has available.

I'm going to see about getting user updates and registration working now. WEE!

Here's the SQL if you're interested:

CREATE VIEW wp_smf_users
	a.memberName AS user_login,
	a.passwd AS user_pass,
	a.usertitle AS user_nicename,
	a.emailAddress AS user_email,
	a.websiteUrl AS user_url,
	FROM_UNIXTIME(a.dateRegistered) AS user_registered,
	a.validation_code AS user_activation_key,
	a.is_activated AS user_status,
	a.realName AS display_name
FROM smf.smf_members AS a

I'm considering using the plug-in system to rename the WP users table
to a backup then replace it with the view... But it'd be nifty if the
plug-in could have been used to define the user table.

The user_meta works fine since it's an auxiliary table that holds
extra stuff... I might see about making that a view as well, but we'll
have to see about that.

If I can get this all working so that WP is using the SMF members
table exclusively with a plug-in and changing 1 file, then I'll be
sure to press forward and add in some bridge code that will make
certain that WP uses the SMF cookie as well... if that's at all

Of course, the more I can convert over from SMF to WP, the better.

I did try to do an update using the view, but it didn't work as I
figured. I'll have to try the trigger method I guess as Sabin

More information about the wp-hackers mailing list