admin管理员组文章数量:1391964
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;
本文标签: customizationHow to make wordpress use a nonwordpress users table
版权声明:本文标题:customization - How to make wordpress use a non-wordpress users table? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744725000a2621909.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论