I’ve a website currently running in CI and it has a user table. I’m making a WordPress website and need it to use the user table of the CI database for users to login in WordPress. How can I use only that table of different database? Both DBs are on same server. Also I have to differentiate between admin and normal users, as admins can enter the dashboard. I’ve tried this plugin but as soon as I activate this plugin my login page stops working and displays a 500 server error.

3 Answers
3

It might work to use a view as essentially a table alias, by doing the something like the following with the WordPress instance mysql database

 DROP TABLE wp_users
 CREATE VIEW wp_users AS SELECT * FROM CI.users;

However

  • will probably need to tweak the view creation to map the columns
  • the password encoding may well be different, so you might have hack WP core anyway to handle this
  • you probably need to manually modify the wp_usermeta table to properly signify admins.

Leave a Reply

Your email address will not be published. Required fields are marked *