I have an existing MySQL database (not WordPress) containing user profile information. I am looking for a way to allow these users to log in to a WordPress site and edit their profile.
It is most likely I will need to write a plugin to do this, however I’m hoping that others have had the same requirement and a solution already exists. I’ve looked at using BuddyPress and GravityForms as possible vehicles but they don’t seem to allow connection to an existing database.
The remote database user profiles contain things like clothing sizes and profile pictures; more than the WordPress profile. About the only thing that is not in the profiles is an email address and password.
The remote database is large and is used by other software clients, so it can not be imported or migrated into WordPress.
You can use the WPDB class to instantiate an external DB.
Looks like roughly this:
then you just call $wpdb_ext with normal WP functions just like you would #wpdb.
For log in info it’s usually easiest to sync login information.
If you really want to build your own oAuth type solution take a look at KeyRing