Share wordpress site between two different user tables

iphone, php, wordpress

Solution

The required functionality looks a bit tricky, there might be more methods possible but the one I will recommend is:

Create a custom login form in wordpress site

Retrieve the username and password and first check if they exists on your site or not. If they do exist then simply login (these are site users) `wp_signon` method can be used here.

If they are not wordpress users then check if they are mobile app user by using `MySQL` and looking into the mobile app table, if they do exists then retrieve their information and register them into `WordPress` site `wp_create_user` can be used for it, you can add custom meta data so that you know these are app users. After registering, create login session using `wp_signon`.

I will recommend you to build a plugin for this task in wordpress.

Happy coding !

Problem

I have a wordpress site, and a iphone app for the same.Both have a common database with different user tables. 1> mysite.com >> wp_user 2> iPhone app >> app_user what i want that, i want to make able app user login to the WordPress site. means 1> site user can only able to login into site 2> app user can login into site + iPhone app how can i make app user able to login into site. i have tried by debugging WP-login script, but can't find correct way i need help from you guys. thanks.

Original source