I've been searching and all I can find is how to share the users table from multiple wordpress sites. I tried using define( 'CUSTOM_USER_TABLE', 'Users' );
, but it's not working. I image it is because my users table has different column names.
I've been searching and all I can find is how to share the users table from multiple wordpress sites. I tried using define( 'CUSTOM_USER_TABLE', 'Users' );
, but it's not working. I image it is because my users table has different column names.
1 Answer
Reset to default 1I figured it out. All I did was create a VIEW mapping the columns like this:
CREATE VIEW wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name)
AS SELECT u.user_id, u.username, u.password, u.first_name, u.email, '', u.date_created, '', 0, u.display_name
FROM Users u;
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744725001a4590123.html
评论列表(0条)