ishwarjoshi
asked on
Automatic/Integrated login to Wordpress using PHP
OK I have googled for hours and unable to find a simple example of how would I automatically login somebody into Wordpress. All the solutions are for how to integrated Wordpress login with PHPBB login etc etc.
Here's the situation:
I have written a new website in PHP. I have my own sign-up and log-in screens and my own tables. Now the client wants a Blog so we installed Wordpress. Obviously, we dont want people to sign-up twice (on the website and on the Blog section) nor do we want them to login twice.
I fixed the sign-up problem by looking at the wordpress tables and then inserting the rows in the wp_user and wp_usermeta tables.
Now comes the hard part. When a user logs into my site, I want a way via PHP to log them automatically into Wordpress. Remember, I have already created that user in Wordpress.
Please dont tell me to just drop my login table and use Wordpress login table.
Thanks.
Here's the situation:
I have written a new website in PHP. I have my own sign-up and log-in screens and my own tables. Now the client wants a Blog so we installed Wordpress. Obviously, we dont want people to sign-up twice (on the website and on the Blog section) nor do we want them to login twice.
I fixed the sign-up problem by looking at the wordpress tables and then inserting the rows in the wp_user and wp_usermeta tables.
Now comes the hard part. When a user logs into my site, I want a way via PHP to log them automatically into Wordpress. Remember, I have already created that user in Wordpress.
Please dont tell me to just drop my login table and use Wordpress login table.
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I see this in the header:
/wp-admin/css/ie.css?versi on=2.5.1
/wp-admin/css/ie.css?versi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am afraid I dont have the option of completely changing my login system.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But it does not work.
Another thing I found is that lets say I create a user with a password of 'abc123' then it is stored in the wp_users table as the md5 of it - e99a18c428cb38d5f260853678
But once I login the first time to WordPress through their own login screen it gets changed to - $P$963M/2aAsqDLuo2sX9UGwWC
But that is not such a big problem since the user would never login through the Wordpress login screen. But even if the above code or any other code works, that would be nice.